mamba icon indicating copy to clipboard operation
mamba copied to clipboard

docs: Document micromamba shell command and fix CLI help text

Open Copilot opened this issue 8 months ago • 1 comments

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 avatar Jul 04 '25 13:07 Copilot