Compare commits

..

No commits in common. "011e9ca0dc65d7f6f73c062efc996039e08a4d73" and "3322afbce3dddf440e1d5265c1cedaa34c47c72d" have entirely different histories.

5 changed files with 35 additions and 38 deletions

View file

@ -4,15 +4,15 @@ complete --command nvm --exclusive --long help --description "Print help"
complete --command nvm --long silent --description "Suppress standard output" complete --command nvm --long silent --description "Suppress standard output"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell" complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate a version in the current shell"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions" complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install" complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version" complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active version"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "(
test -e $nvm_data && string split ' ' <$nvm_data/.index test -e $nvm_data && string split ' ' <$nvm_data/.index
)" )"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')"
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version" complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall a version"
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "(
_nvm_list | string split ' ' | string replace system '' _nvm_list | string split ' ' | string replace system ''
)" )"

View file

@ -1,17 +1,17 @@
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
set --global nvm_data $XDG_DATA_HOME/nvm
function _nvm_install --on-event nvm_install function _nvm_install --on-event nvm_install
set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
set --universal nvm_data $XDG_DATA_HOME/nvm
test ! -d $nvm_data && command mkdir -p $nvm_data test ! -d $nvm_data && command mkdir -p $nvm_data
echo "Downloading the Node distribution index..." 2>/dev/null echo "Downloading the Node distribution index..." 2>/dev/null
_nvm_index_update _nvm_index_update
end end
function _nvm_update --on-event nvm_update function _nvm_update --on-event nvm_update
set --query --universal nvm_data && set --erase --universal nvm_data set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist
set --query --universal nvm_mirror && set --erase --universal nvm_mirror set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist set --universal nvm_data $XDG_DATA_HOME/nvm
end end
function _nvm_uninstall --on-event nvm_uninstall function _nvm_uninstall --on-event nvm_uninstall

View file

@ -15,7 +15,7 @@ fish_add_path --append \
if command -s pyenv > /dev/null if command -s pyenv > /dev/null
set -Ux PYENV_ROOT $HOME/.pyenv set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path --move $PYENV_ROOT/bin fish_add_path --move $PYENV_ROOT/bin
pyenv init - | source pyenv init - | source
end end

View file

@ -29,31 +29,26 @@ function nvm --description "Node version manager"
switch "$cmd" switch "$cmd"
case -v --version case -v --version
echo "nvm, version 2.2.13" echo "nvm, version 2.2.11"
case "" -h --help case "" -h --help
echo "Usage: nvm install <version> Download and activate the specified Node version" echo "Usage: nvm install <version> Download and activate the specified Node version"
echo " nvm install Install the version specified in the nearest .nvmrc file" echo " nvm install Install version from nearest .nvmrc file"
echo " nvm use <version> Activate the specified Node version in the current shell" echo " nvm use <version> Activate a version in the current shell"
echo " nvm use Activate the version specified in the nearest .nvmrc file" echo " nvm use Activate version from nearest .nvmrc file"
echo " nvm list List installed Node versions" echo " nvm list List installed versions"
echo " nvm list-remote List available Node versions to install" echo " nvm list-remote List versions available to install"
echo " nvm list-remote <regex> List Node versions matching a given regex pattern" echo " nvm list-remote <regex> List versions matching a given regular expression"
echo " nvm current Print the currently-active Node version" echo " nvm current Print the currently-active version"
echo " nvm uninstall <version> Uninstall the specified Node version" echo " nvm uninstall <version> Uninstall a version"
echo "Options:" echo "Options:"
echo " -s, --silent Suppress standard output" echo " -s or --silent Suppress standard output"
echo " -v, --version Print the version of nvm" echo " -v or --version Print version"
echo " -h, --help Print this help message" echo " -h or --help Print this help message"
echo "Variables:" echo "Variables:"
echo " nvm_arch Override architecture, e.g. x64-musl" echo " nvm_arch Override architecture, e.g. x64-musl"
echo " nvm_mirror Use a mirror for downloading Node binaries" echo " nvm_mirror Use a mirror of the Node binaries"
echo " nvm_default_version Set the default version for new shells" echo " nvm_default_version Set the default version for new shells"
echo " nvm_default_packages Install a list of packages every time a Node version is installed" echo " nvm_default_packages Install a list of packages every time you install a Node version"
echo "Examples:"
echo " nvm install latest Install the latest version of Node"
echo " nvm use 14.15.1 Use Node version 14.15.1"
echo " nvm use system Activate the system's Node version"
case install case install
_nvm_index_update _nvm_index_update
@ -200,7 +195,8 @@ end
function _nvm_version_match --argument-names ver function _nvm_version_match --argument-names ver
string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver | string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver |
string replace --filter --regex -- '^v?(\d+)' 'v$1' | string replace --filter --regex -- '^v?(\d+)' 'v$1' |
string escape --style=regex || string lower '\b'$ver'(?:/\w+)?$' string escape --style=regex ||
string lower '\b'$ver'(?:/\w+)?$'
end end
function _nvm_list_format --argument-names current regex function _nvm_list_format --argument-names current regex
@ -229,6 +225,6 @@ function _nvm_node_info
command node --eval " command node --eval "
console.log(process.version) console.log(process.version)
console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version) console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version)
console.log(process.execPath) console.log(process.execPath.replace(require('os').homedir(), '~'))
" | string replace -- ~ \~ "
end end

View file

@ -69,10 +69,11 @@ def restore_pip():
def configure_python(): def configure_python():
backup_pip() backup_pip()
try: try:
run("python3", "-m", "pip", "install", "--user", "pipx") run("pip3", "install", "black")
run("python3", "-m", "pipx", "ensurepath")
run("/home/coder/.local/bin/pipx", "install", "poetry")
run("sudo", "npm", "install", "-g", "prettier", "pyright") run("sudo", "npm", "install", "-g", "prettier", "pyright")
installer = urllib.request.urlopen("https://install.python-poetry.org").read()
subprocess.run(["python3", "-"], input=installer, check=True)
finally: finally:
restore_pip() restore_pip()