Skip to content

Commit

Permalink
Merge branch 'jdx:main' into feature/git_remote_task
Browse files Browse the repository at this point in the history
  • Loading branch information
acesyde authored Feb 4, 2025
2 parents de47e62 + 67eb899 commit bb32c5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/cli/activate.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Initializes mise in the current shell session

This should go into your shell's rc file or login shell.
Otherwise, it will only take effect in the current session.
(e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish)
(e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish, or $PROFILE for powershell)

Typically, this can be added with something like the following:

Expand Down Expand Up @@ -71,4 +71,5 @@ eval "$(mise activate bash)"
eval "$(mise activate zsh)"
mise activate fish | source
execx($(mise activate xonsh))
(&mise activate pwsh) | Out-String | Invoke-Expression
```
4 changes: 2 additions & 2 deletions mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ arg "[TASK]" help="Task to run" help_long="Task to run.\n\nShorthand for `mise t
arg "[TASK_ARGS]..." help="Task arguments" required=#false var=#true hide=#true
arg "[-- TASK_ARGS_LAST]..." required=#false var=#true hide=#true
cmd activate help="Initializes mise in the current shell session" {
long_help "Initializes mise in the current shell session\n\nThis should go into your shell's rc file or login shell.\nOtherwise, it will only take effect in the current session.\n(e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish)\n\nTypically, this can be added with something like the following:\n\n echo 'eval \"$(mise activate zsh)\"' >> ~/.zshrc\n\nHowever, this requires that \"mise\" is in your PATH. If it is not, you need to\nspecify the full path like this:\n\n echo 'eval \"$(/path/to/mise activate zsh)\"' >> ~/.zshrc\n\nCustomize status output with `status` settings."
after_long_help "Examples:\n\n $ eval \"$(mise activate bash)\"\n $ eval \"$(mise activate zsh)\"\n $ mise activate fish | source\n $ execx($(mise activate xonsh))\n"
long_help "Initializes mise in the current shell session\n\nThis should go into your shell's rc file or login shell.\nOtherwise, it will only take effect in the current session.\n(e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish, or $PROFILE for powershell)\n\nTypically, this can be added with something like the following:\n\n echo 'eval \"$(mise activate zsh)\"' >> ~/.zshrc\n\nHowever, this requires that \"mise\" is in your PATH. If it is not, you need to\nspecify the full path like this:\n\n echo 'eval \"$(/path/to/mise activate zsh)\"' >> ~/.zshrc\n\nCustomize status output with `status` settings."
after_long_help "Examples:\n\n $ eval \"$(mise activate bash)\"\n $ eval \"$(mise activate zsh)\"\n $ mise activate fish | source\n $ execx($(mise activate xonsh))\n $ (&mise activate pwsh) | Out-String | Invoke-Expression\n"
flag "-s --shell" help="Shell type to generate the script for" hide=#true {
arg <SHELL> {
choices bash elvish fish nu xonsh zsh pwsh
Expand Down
3 changes: 2 additions & 1 deletion src/cli/activate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use itertools::Itertools;
///
/// This should go into your shell's rc file or login shell.
/// Otherwise, it will only take effect in the current session.
/// (e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish)
/// (e.g. ~/.zshrc, ~/.zprofile, ~/.zshenv, ~/.bashrc, ~/.bash_profile, ~/.profile, ~/.config/fish/config.fish, or $PROFILE for powershell)
///
/// Typically, this can be added with something like the following:
///
Expand Down Expand Up @@ -161,5 +161,6 @@ static AFTER_LONG_HELP: &str = color_print::cstr!(
$ <bold>eval "$(mise activate zsh)"</bold>
$ <bold>mise activate fish | source</bold>
$ <bold>execx($(mise activate xonsh))</bold>
$ <bold>(&mise activate pwsh) | Out-String | Invoke-Expression</bold>
"#
);

0 comments on commit bb32c5c

Please sign in to comment.