From 7929190e6e9bd879cddb0af7fe1588dab5a70152 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 2 Oct 2020 22:22:12 -0700 Subject: [PATCH] [Docs] improve `nvm --help` output Fixes #2301 --- nvm.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/nvm.sh b/nvm.sh index f6922d1..995cb74 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2393,7 +2393,9 @@ nvm() { nvm_echo 'Usage:' nvm_echo ' nvm --help Show this message' nvm_echo ' nvm --version Print out the installed version of nvm' - nvm_echo ' nvm install [-s] [] Download and install a , [-s] from source. Uses .nvmrc if available' + nvm_echo ' nvm install [] Download and install a . Uses .nvmrc if available and version is omitted.' + nvm_echo ' The following optional arguments, if provided, must appear directly after `nvm install`:' + nvm_echo ' -s Skip binary download, install from source only.' nvm_echo ' --reinstall-packages-from= When installing, reinstall packages installed in ' nvm_echo ' --lts When installing, only select from LTS (long-term support) versions' nvm_echo ' --lts= When installing, only select from versions for a specific LTS line' @@ -2405,13 +2407,19 @@ nvm() { nvm_echo ' nvm uninstall Uninstall a version' nvm_echo ' nvm uninstall --lts Uninstall using automatic LTS (long-term support) alias `lts/*`, if available.' nvm_echo ' nvm uninstall --lts= Uninstall using automatic alias for provided LTS line, if available.' - nvm_echo ' nvm use [--silent] [] Modify PATH to use . Uses .nvmrc if available' + nvm_echo ' nvm use [] Modify PATH to use . Uses .nvmrc if available and version is omitted.' + nvm_echo ' The following optional arguments, if provided, must appear directly after `nvm use`:' + nvm_echo ' --silent Silences stdout/stderr output' nvm_echo ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.' nvm_echo ' --lts= Uses automatic alias for provided LTS line, if available.' - nvm_echo ' nvm exec [--silent] [] [] Run on . Uses .nvmrc if available' + nvm_echo ' nvm exec [] [] Run on . Uses .nvmrc if available and version is omitted.' + nvm_echo ' The following optional arguments, if provided, must appear directly after `nvm exec`:' + nvm_echo ' --silent Silences stdout/stderr output' nvm_echo ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.' nvm_echo ' --lts= Uses automatic alias for provided LTS line, if available.' - nvm_echo ' nvm run [--silent] [] [] Run `node` on with as arguments. Uses .nvmrc if available' + nvm_echo ' nvm run [] [] Run `node` on with as arguments. Uses .nvmrc if available and version is omitted.' + nvm_echo ' The following optional arguments, if provided, must appear directly after `nvm run`:' + nvm_echo ' --silent Silences stdout/stderr output' nvm_echo ' --lts Uses automatic LTS (long-term support) alias `lts/*`, if available.' nvm_echo ' --lts= Uses automatic alias for provided LTS line, if available.' nvm_echo ' nvm current Display currently activated version of Node' @@ -2426,7 +2434,8 @@ nvm() { nvm_echo ' nvm version-remote Resolve the given description to a single remote version' nvm_echo ' --lts When listing, only select from LTS (long-term support) versions' nvm_echo ' --lts= When listing, only select from versions for a specific LTS line' - nvm_echo ' nvm deactivate [--silent] Undo effects of `nvm` on current shell' + nvm_echo ' nvm deactivate Undo effects of `nvm` on current shell' + nvm_echo ' --silent Silences stdout/stderr output' nvm_echo ' nvm alias [] Show all aliases beginning with ' nvm_echo ' --no-colors Suppress colored output' nvm_echo ' nvm alias Set an alias named pointing to ' @@ -2434,7 +2443,8 @@ nvm() { nvm_echo ' nvm install-latest-npm Attempt to upgrade to the latest working `npm` on the current node version' nvm_echo ' nvm reinstall-packages Reinstall global `npm` packages contained in to current version' nvm_echo ' nvm unload Unload `nvm` from shell' - nvm_echo ' nvm which [--silent] [current | ] Display path to installed node version. Uses .nvmrc if available' + nvm_echo ' nvm which [current | ] Display path to installed node version. Uses .nvmrc if available and version is omitted.' + nvm_echo ' --silent Silences stdout/stderr output when a version is omitted' nvm_echo ' nvm cache dir Display path to the cache directory for nvm' nvm_echo ' nvm cache clear Empty cache directory for nvm' nvm_echo