Skip to content

Document micromamba shell command and fix CLI help text #4007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 4, 2025

The micromamba shell command lacked proper documentation and had misleading CLI help text. This PR addresses the issue by:

CLI Help Text Improvements

  • Main command: Changed description from "Generate shell init scripts" to "Launch a shell or manage shell initialization scripts" to accurately reflect the dual functionality
  • Hook subcommand: Improved description from "Micromamba hook scripts " to "Output shell hook scripts for environment activation"
  • Enable long path support: Fixed incorrect description from "Output deactivation code for the given shell" to "Enable long path support on Windows"

Comprehensive Documentation Added

Added detailed documentation to the user guide covering:

Shell Command Overview

Explains that micromamba shell serves dual purposes:

  1. Launching shells in specific environments
  2. Managing shell initialization scripts

Usage Examples

# Launch a shell in the specified environment
micromamba shell -p /path/to/env
micromamba shell -n myenv

# Generate activation code for bash
micromamba shell activate -p /path/to/env -s bash

# Use in a script
eval "$(micromamba shell activate -p /path/to/env -s bash)"

Complete Subcommand Documentation

  • init - Add initialization scripts to shell RC files
  • deinit - Remove initialization scripts from shell RC files
  • reinit - Restore initialization scripts in shell RC files
  • activate - Generate activation code for specified environment
  • deactivate - Generate deactivation code to leave current environment
  • reactivate - Generate reactivation code to refresh current environment
  • hook - Generate shell hook scripts for environment activation
  • enable_long_path_support - Enable long path support on Windows

Supported Shells

Documents all supported shells: bash, zsh, fish, powershell, cmd.exe, xonsh, tcsh, dash, nu, posix

Common Options

Complete documentation of -s/--shell, -p/--prefix, -n/--name, -r/--root-prefix options

The changes are minimal and targeted - only 3 lines changed in source code plus comprehensive documentation. This makes the micromamba shell command much more discoverable and usable, especially in CI/CD environments and Docker containers.

Fixes #2072.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Document new shell cmd Document micromamba shell command and fix CLI help text Jul 4, 2025
Copilot finished work on behalf of jjerphan July 4, 2025 14:07
@Copilot Copilot AI requested a review from jjerphan July 4, 2025 14:07
@jjerphan jjerphan added the release::ci_docs For PRs related to CI or documentation label Jul 4, 2025
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 63.83%. Comparing base (14a94d3) to head (ef04de4).

Files with missing lines Patch % Lines
micromamba/src/shell.cpp 0.00% 1 Missing ⚠️
micromamba/src/umamba.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4007      +/-   ##
==========================================
- Coverage   63.83%   63.83%   -0.01%     
==========================================
  Files         303      303              
  Lines       38704    38704              
  Branches     2859     2859              
==========================================
- Hits        24708    24707       -1     
- Misses      13929    13930       +1     
  Partials       67       67              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::ci_docs For PRs related to CI or documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document new shell cmd
2 participants