From e291cc3802d027d9738b5060d9c68be8b20269e3 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdx@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:52:08 -0600 Subject: [PATCH] docs --- docs/cli-reference.md | 4 ++++ src/cli/shell.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/cli-reference.md b/docs/cli-reference.md index 8955ef8307..4bf5c384a3 100644 --- a/docs/cli-reference.md +++ b/docs/cli-reference.md @@ -1117,6 +1117,10 @@ Sets a tool version for the current session Only works in a session where mise is already activated. +This works by setting environment variables for the current shell session +such as `MISE_NODE_VERSION=20` which is "eval"ed as a shell function created +by `mise activate`. + Usage: shell [OPTIONS] [TOOL@VERSION]... Arguments: diff --git a/src/cli/shell.rs b/src/cli/shell.rs index e08e6a4550..828943695c 100644 --- a/src/cli/shell.rs +++ b/src/cli/shell.rs @@ -9,6 +9,10 @@ use crate::toolset::{InstallOptions, ToolSource, ToolsetBuilder}; /// Sets a tool version for the current session /// /// Only works in a session where mise is already activated. +/// +/// This works by setting environment variables for the current shell session +/// such as `MISE_NODE_VERSION=20` which is "eval"ed as a shell function created +/// by `mise activate`. #[derive(Debug, clap::Args)] #[clap(verbatim_doc_comment, visible_alias = "sh", after_long_help = AFTER_LONG_HELP)] pub struct Shell {