nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Suspected regression] Unable to binary install on zsh

signed-log opened this issue · comments

Operating system and version:

nvm debug output:

nvm --version: v0.39.3
$TERM_PROGRAM: tmux
$SHELL: /usr/bin/zsh
$SHLVL: 1
whoami: 'signed'
${HOME}: /home/signed
${NVM_DIR}: '${HOME}/.config/nvm'
${PATH}: ${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.zi/plugins/zdharma---revolver:${HOME}/.zi/polaris/sbin:${HOME}/.zi/polaris/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:/usr/bin:/bin:${HOME}/.dotnet/tools
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (x86_64-suse-linux-gnu)'
uname -a: 'Linux 6.1.4-1-default #1 SMP PREEMPT_DYNAMIC Mon Jan 9 11:00:31 UTC 2023 (4b9b43c) x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Welcome to openSUSE Tumbleweed 20230112 - Kernel  ().
awk: /usr/bin/awk, GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.1.1-p1, GNU MP 6.2.1)
curl: /usr/bin/curl, curl 7.87.0 (x86_64-suse-linux-gnu) libcurl/7.87.0 OpenSSL/1.1.1s-fips zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh/0.10.4/openssl/zlib nghttp2/1.51.0
wget: /usr/bin/wget, GNU Wget 1.21.3 built on linux-gnu.
git: /usr/bin/git, git version 2.39.0
ls: cannot access 'grep:': No such file or directory
grep: grep: aliased to grep --color (grep --color), grep (GNU grep) 3.8
sed: /usr/bin/sed, sed (GNU sed) 4.9
cut: /usr/bin/cut, cut (GNU coreutils) 9.1
basename: /usr/bin/basename, basename (GNU coreutils) 9.1
ls: cannot access 'rm:': No such file or directory
rm: rm: aliased to rm -i (rm -i), rm (GNU coreutils) 9.1
ls: cannot access 'mkdir:': No such file or directory
mkdir: mkdir: aliased to mkdir -pv (mkdir -pv), mkdir (GNU coreutils) 9.1
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.9.0
nvm current: none
which node: node not found
which iojs: iojs not found
which npm: npm not found
npm config get prefix: nvm:271: command not found: npm
npm root -g: nvm:271: command not found: npm
nvm --version: v0.39.2
$TERM_PROGRAM: tmux
$SHELL: /usr/bin/zsh
$SHLVL: 1
whoami: 'signed'
${HOME}: /home/signed
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.zi/plugins/zdharma---revolver:${HOME}/.zi/polaris/sbin:${HOME}/.zi/polaris/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:/usr/bin:/bin:${HOME}/.dotnet/tools
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (x86_64-suse-linux-gnu)'
uname -a: 'Linux 6.1.4-1-default #1 SMP PREEMPT_DYNAMIC Mon Jan 9 11:00:31 UTC 2023 (4b9b43c) x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Welcome to openSUSE Tumbleweed 20230112 - Kernel  ().
grep: warning: stray \ before /
curl: /usr/bin/curl, curl 7.87.0 (x86_64-suse-linux-gnu) libcurl/7.87.0 OpenSSL/1.1.1s-fips zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh/0.10.4/openssl/zlib nghttp2/1.51.0
grep: warning: stray \ before /
wget: /usr/bin/wget, GNU Wget 1.21.3 built on linux-gnu.
grep: warning: stray \ before /
grep: warning: stray \ before /
git: /usr/bin/git, git version 2.39.0
ls: cannot access 'grep:': No such file or directory
grep: grep: aliased to grep --color (grep --color), grep (GNU grep) 3.8
grep: warning: stray \ before /
grep: warning: stray \ before /
awk: /usr/bin/awk, GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.1.1-p1, GNU MP 6.2.1)
grep: warning: stray \ before /
grep: warning: stray \ before /
sed: /usr/bin/sed, sed (GNU sed) 4.9
grep: warning: stray \ before /
grep: warning: stray \ before /
cut: /usr/bin/cut, cut (GNU coreutils) 9.1
grep: warning: stray \ before /
grep: warning: stray \ before /
basename: /usr/bin/basename, basename (GNU coreutils) 9.1
ls: cannot access 'rm:': No such file or directory
rm: rm: aliased to rm -i (rm -i), rm (GNU coreutils) 9.1
ls: cannot access 'mkdir:': No such file or directory
mkdir: mkdir: aliased to mkdir -pv (mkdir -pv), mkdir (GNU coreutils) 9.1
grep: warning: stray \ before /
grep: warning: stray \ before /
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.9.0
nvm current: none
which node: node not found
which iojs: iojs not found
which npm: npm not found
npm config get prefix: nvm:298: command not found: npm
npm root -g: nvm:298: command not found: npm

Last working version :

nvm --version: v0.39.1
$TERM_PROGRAM: tmux
$SHELL: /usr/bin/zsh
$SHLVL: 1
whoami: 'signed'
${HOME}: /home/signed
${NVM_DIR}: '${HOME}/.config/nvm'
${PATH}: ${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:${HOME}/.zi/plugins/zdharma---revolver:${HOME}/.zi/polaris/sbin:${HOME}/.zi/polaris/bin:${HOME}/.emacs.d/bin:${HOME}/.cargo/bin:${HOME}/.spicetify:${HOME}/.local/bin:${HOME}/.local/bin/misc/:${HOME}/bin:/usr/local/bin:/usr/bin:/bin:${HOME}/.dotnet/tools
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (x86_64-suse-linux-gnu)'
uname -a: 'Linux 6.1.4-1-default #1 SMP PREEMPT_DYNAMIC Mon Jan 9 11:00:31 UTC 2023 (4b9b43c) x86_64 x86_64 x86_64 GNU/Linux'
checksum binary: 'sha256sum'
OS version: Welcome to openSUSE Tumbleweed 20230112 - Kernel  ().
grep: warning: stray \ before /
curl: /usr/bin/curl, curl 7.87.0 (x86_64-suse-linux-gnu) libcurl/7.87.0 OpenSSL/1.1.1s-fips zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh/0.10.4/openssl/zlib nghttp2/1.51.0
grep: warning: stray \ before /
wget: /usr/bin/wget, GNU Wget 1.21.3 built on linux-gnu.
grep: warning: stray \ before /
grep: warning: stray \ before /
git: /usr/bin/git, git version 2.39.0
ls: cannot access 'grep:': No such file or directory
grep: grep: aliased to grep --color (grep --color), grep (GNU grep) 3.8
grep: warning: stray \ before /
grep: warning: stray \ before /
awk: /usr/bin/awk, GNU Awk 5.2.1, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.1.1-p1, GNU MP 6.2.1)
grep: warning: stray \ before /
grep: warning: stray \ before /
sed: /usr/bin/sed, sed (GNU sed) 4.9
grep: warning: stray \ before /
grep: warning: stray \ before /
cut: /usr/bin/cut, cut (GNU coreutils) 9.1
grep: warning: stray \ before /
grep: warning: stray \ before /
basename: /usr/bin/basename, basename (GNU coreutils) 9.1
ls: cannot access 'rm:': No such file or directory
rm: rm: aliased to rm -i (rm -i), rm (GNU coreutils) 9.1
ls: cannot access 'mkdir:': No such file or directory
mkdir: mkdir: aliased to mkdir -pv (mkdir -pv), mkdir (GNU coreutils) 9.1
grep: warning: stray \ before /
grep: warning: stray \ before /
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.9.0
nvm current: none
which node: node not found
which iojs: iojs not found
which npm: npm not found
npm config get prefix: nvm:289: command not found: npm
npm root -g: nvm:289: command not found: npm

nvm ls output:

0.39.3 :

iojs -> N/A (default)
node -> stable (-> N/A) (default)
unstable -> N/A (default)
lts/* -> lts/hydrogen (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.2 (-> N/A)
lts/gallium -> v16.19.0 (-> N/A)
lts/hydrogen -> v18.13.0 (-> N/A)

How did you install nvm?

First by zsh-nvm then manually by git

What steps did you perform?

  • Install nvm >= v0.39.2 (works on nvm == v0.39.1)
  • Install any version (was trying to install --lts)

What happened?

nvm somehow dumps all of zsh config in the archive download URL, which of course is invalid and even trigger File name too long, source install seems to work

Full log

What did you expect to happen?

Working install

Is there anything in any of your profile files that modifies the PATH?

Yes

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying [2606:4700:10::6814:172e]:443...
* Connected to nodejs.org (2606:4700:10::6814:172e) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
} [5 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [4836 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [520 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.nodejs.org
*  start date: Jan 11 00:00:00 2022 GMT
*  expire date: Feb 11 23:59:59 2023 GMT
*  subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
} [5 bytes data]
* h2h3 [:method: HEAD]
* h2h3 [:path: /dist/]
* h2h3 [:scheme: https]
* h2h3 [:authority: nodejs.org]
* h2h3 [user-agent: curl/7.87.0]
* h2h3 [accept: */*]
* h2h3 [accept-encoding: deflate, gzip, br, zstd]
* Using Stream ID: 1 (easy handle 0x564b23657890)
} [5 bytes data]
> HEAD /dist/ HTTP/2
> Host: nodejs.org
> user-agent: curl/7.87.0
> accept: */*
> accept-encoding: deflate, gzip, br, zstd
> 
{ [5 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [230 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
} [5 bytes data]
< HTTP/2 200 
< date: Sun, 15 Jan 2023 09:16:00 GMT
< content-type: text/html
< last-modified: Sun, 15 Jan 2023 08:05:05 GMT
< cache-control: max-age=14400
< cf-cache-status: HIT
< age: 4220
< vary: Accept-Encoding
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
< server: cloudflare
< cf-ray: 789d8299b95ad636-CDG
< content-encoding: br
< 

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host nodejs.org left intact
HTTP/2 200 
date: Sun, 15 Jan 2023 09:16:00 GMT
content-type: text/html
last-modified: Sun, 15 Jan 2023 08:05:05 GMT
cache-control: max-age=14400
cf-cache-status: HIT
age: 4220
vary: Accept-Encoding
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
server: cloudflare
cf-ray: 789d8299b95ad636-CDG
content-encoding: br

Can you share which zsh options you’ve set, and also, what shell aliases you’ve defined?

Sure,

Aliases :

..='cd ..'
...='cd ../..'
CA='2>&1 | cat -A'
G='| grep'
H='| head'
L='| less'
LL='2>&1 | less'
M='| most'
NE='2> /dev/null'
NUL='> /dev/null 2>&1'
P='2>&1| pygmentize -l pytb'
T='| tail'
beep='echo -en "\007"'
cat=bat
cd..='cd ..'
clr='clear; echo Currently logged in on $TTY, as $USERNAME in directory $PWD.'
cp='cp -i'
dbl='docker build'
dcin='docker container inspect'
dcls='docker container ls'
dclsa='docker container ls -a'
dib='docker image build'
diff='diff --color'
dii='docker image inspect'
dils='docker image ls'
dipu='docker image push'
dir='ls -l'
dirm='docker image rm'
dit='docker image tag'
dlo='docker container logs'
dnc='docker network create'
dncn='docker network connect'
dndcn='docker network disconnect'
dni='docker network inspect'
dnls='docker network ls'
dnrm='docker network rm'
dpo='docker container port'
dpu='docker pull'
dr='docker container run'
drit='docker container run -it'
drm='docker container rm'
'drm!'='docker container rm -f'
drs='docker container restart'
dst='docker container start'
dsta='docker stop $(docker ps -q)'
dstp='docker container stop'
dtop='docker top'
dud='du -d 1 -h'
duf='du -sh *'
dvi='docker volume inspect'
dvls='docker volume ls'
dvprune='docker volume prune'
dxc='docker container exec'
dxcit='docker container exec -it'
egrep='egrep --color=auto'
ff='find . -type f -name'
fgrep='fgrep --color=auto'
fsh-alias=fast-theme
fw='sudo firewall-cmd'
fwp='sudo firewall-cmd --permanent'
fwr='sudo firewall-cmd --reload'
fwrp='sudo firewall-cmd --runtime-to-permanent'
g=git
ga='git add'
gaa='git add --all'
gam='git am'
gama='git am --abort'
gamc='git am --continue'
gams='git am --skip'
gamscp='git am --show-current-patch'
gap='git apply'
gapa='git add --patch'
gapt='git apply --3way'
gau='git add --update'
gav='git add --verbose'
gb='git branch'
gbD='git branch --delete --force'
gba='git branch --all'
gbd='git branch --delete'
gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null'
gbl='git blame -b -w'
gbnm='git branch --no-merged'
gbr='git branch --remote'
gbs='git bisect'
gbsb='git bisect bad'
gbsg='git bisect good'
gbsr='git bisect reset'
gbss='git bisect start'
gc='git commit --verbose'
'gc!'='git commit --verbose --amend'
gca='git commit --verbose --all'
'gca!'='git commit --verbose --all --amend'
gcam='git commit --all --message'
'gcan!'='git commit --verbose --all --no-edit --amend'
'gcans!'='git commit --verbose --all --signoff --no-edit --amend'
gcas='git commit --all --signoff'
gcasm='git commit --all --signoff --message'
gcb='git checkout -b'
gcd='git checkout $(git_develop_branch)'
gcf='git config --list'
gcl='git clone --recurse-submodules'
gclean='git clean --interactive -d'
gcm='git checkout $(git_main_branch)'
gcmsg='git commit --message'
'gcn!'='git commit --verbose --no-edit --amend'
gco='git checkout'
gcor='git checkout --recurse-submodules'
gcount='git shortlog --summary --numbered'
gcp='git cherry-pick'
gcpa='git cherry-pick --abort'
gcpc='git cherry-pick --continue'
gcs='git commit --gpg-sign'
gcsm='git commit --signoff --message'
gcss='git commit --gpg-sign --signoff'
gcssm='git commit --gpg-sign --signoff --message'
gd='git diff'
gdca='git diff --cached'
gdct='git describe --tags $(git rev-list --tags --max-count=1)'
gdcw='git diff --cached --word-diff'
gds='git diff --staged'
gdt='git diff-tree --no-commit-id --name-only -r'
gdup='git diff @{upstream}'
gdw='git diff --word-diff'
gf='git fetch'
gfa='git fetch --all --prune --jobs=10'
gfg='git ls-files | grep'
gfo='git fetch origin'
gg='git gui citool'
gga='git gui citool --amend'
ggpull='git pull origin "$(git_current_branch)"'
ggpur=ggu
ggpush='git push origin "$(git_current_branch)"'
ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
ghh='git help'
gignore='git update-index --assume-unchanged'
gignored='git ls-files -v | grep "^[[:lower:]]"'
git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
gk='\gitk --all --branches &!'
gke='\gitk --all $(git log --walk-reflogs --pretty=%h) &!'
gl='git pull'
glfsi='git lfs install'
glfsls='git lfs ls-files'
glfsmi='git lfs migrate import --include='
glfst='git lfs track'
glg='git log --stat'
glgg='git log --graph'
glgga='git log --graph --decorate --all'
glgm='git log --graph --max-count=10'
glgp='git log --stat --patch'
glo='git log --oneline --decorate'
glod='git log --graph --pretty=''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'''
glods='git log --graph --pretty=''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'' --date=short'
glog='git log --oneline --decorate --graph'
gloga='git log --oneline --decorate --graph --all'
glol='git log --graph --pretty=''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'''
glola='git log --graph --pretty=''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'' --all'
glols='git log --graph --pretty=''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'' --stat'
glp=_git_log_prettily
gluc='git pull upstream $(git_current_branch)'
glum='git pull upstream $(git_main_branch)'
gm='git merge'
gma='git merge --abort'
gmom='git merge origin/$(git_main_branch)'
gmtl='git mergetool --no-prompt'
gmtlvim='git mergetool --no-prompt --tool=vimdiff'
gmum='git merge upstream/$(git_main_branch)'
gp='git push'
gpd='git push --dry-run'
gpf='git push --force-with-lease'
'gpf!'='git push --force'
gpoat='git push origin --all && git push origin --tags'
gpr='git pull --rebase'
gpristine='git reset --hard && git clean --force -dx'
gpsup='git push --set-upstream origin $(git_current_branch)'
gpu='git push upstream'
gpv='git push --verbose'
gr='git remote'
gra='git remote add'
grb='git rebase'
grba='git rebase --abort'
grbc='git rebase --continue'
grbd='git rebase $(git_develop_branch)'
grbi='git rebase --interactive'
grbm='git rebase $(git_main_branch)'
grbo='git rebase --onto'
grbom='git rebase origin/$(git_main_branch)'
grbs='git rebase --skip'
grep='grep --color'
grev='git revert'
grh='git reset'
grhh='git reset --hard'
grm='git rm'
grmc='git rm --cached'
grmv='git remote rename'
groh='git reset origin/$(git_current_branch) --hard'
grrm='git remote remove'
grs='git restore'
grset='git remote set-url'
grss='git restore --source'
grst='git restore --staged'
grt='cd "$(git rev-parse --show-toplevel || echo .)"'
gru='git reset --'
grup='git remote update'
grv='git remote --verbose'
gsb='git status --short --branch'
gsd='git svn dcommit'
gsh='git show'
gsi='git submodule init'
gsps='git show --pretty=short --show-signature'
gsr='git svn rebase'
gss='git status --short'
gst='git status'
gsta='git stash push'
gstaa='git stash apply'
gstall='git stash --all'
gstc='git stash clear'
gstd='git stash drop'
gstl='git stash list'
gstp='git stash pop'
gsts='git stash show --text'
gstu='gsta --include-untracked'
gsu='git submodule update'
gsw='git switch'
gswc='git switch --create'
gswd='git switch $(git_develop_branch)'
gswm='git switch $(git_main_branch)'
gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl'
gts='git tag --sign'
gtv='git tag | sort -V'
gunignore='git update-index --no-assume-unchanged'
gunwip='git log --max-count=1 | grep -q -c "\--wip--" && git reset HEAD~1'
gup='git pull --rebase'
gupa='git pull --rebase --autostash'
gupav='git pull --rebase --autostash --verbose'
gupom='git pull --rebase origin $(git_main_branch)'
gupomi='git pull --rebase=interactive origin $(git_main_branch)'
gupv='git pull --rebase --verbose'
gwch='git whatchanged -p --abbrev-commit --pretty=medium'
gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"'
gwt='git worktree'
gwta='git worktree add'
gwtls='git worktree list'
gwtmv='git worktree move'
gwtrm='git worktree remove'
h=history
help=man
hgrep='fc -El 0 | grep'
hist10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
ip='ip --color=auto'
ipython='python3 -c ''import IPython; IPython.terminal.ipapp.launch_new_instance()'''
l='ls -lFh'
lS='ls -1FSsh'
la='ls -lAFh'
lart='ls -1Fcart'
ldot='ls -ld .*'
ll='ls -l'
lr='ls -tRFh'
lrt='ls -1Fcrt'
ls='exa --group-directories-first --all'
ls-l='ls -l'
lsn='ls -1'
lsr='ls -lARFh'
lt='ls -ltFh'
md='mkdir -p'
mkdir='mkdir -pv'
mv='mv -i'
o=less
p='ps -f'
path='print -l $path'
pch='pipenv check'
pcl='pipenv clean'
pgr='pipenv graph'
pi='pipenv install'
pidev='pipenv install --dev'
ping='ping -c 5'
pip='noglob pip'
pipgi='pip freeze | grep'
pipi='pip install'
pipir='pip install -r requirements.txt'
piplo='pip list -o'
pipreq='pip freeze > requirements.txt'
pipu='pip install --upgrade'
pipun='pip uninstall'
pl='pipenv lock'
po='pipenv open'
ppy='pipenv --py'
prun='pipenv run'
pscpu='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr'
pscpu10='ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -n 10'
psh='pipenv shell'
psmem='ps -e -orss=,args= | sort -b -k1 -nr'
psmem10='ps -e -orss=,args= | sort -b -k1 -nr | head -n 10'
psy='pipenv sync'
pu='pipenv uninstall'
pvenv='pipenv --venv'
pwh='pipenv --where'
py=python3
pyfind='find . -name "*.py"'
pygrep='grep -nr --include="*.py"'
pylint-quick='pylint --reports=n'
pyserver='python3 -m http.server'
rd=rmdir
rm='rm -i'
sc-add-requires='sudo systemctl add-requires'
sc-add-wants='sudo systemctl add-wants'
sc-cancel='sudo systemctl cancel'
sc-cat='systemctl cat'
sc-daemon-reexec='sudo systemctl daemon-reexec'
sc-daemon-reload='sudo systemctl daemon-reload'
sc-default='sudo systemctl default'
sc-disable='sudo systemctl disable'
sc-disable-now='sc-disable --now'
sc-edit='sudo systemctl edit'
sc-emergency='sudo systemctl emergency'
sc-enable='sudo systemctl enable'
sc-enable-now='sc-enable --now'
sc-get-default='systemctl get-default'
sc-halt='sudo systemctl halt'
sc-help='systemctl help'
sc-hibernate='systemctl hibernate'
sc-hybrid-sleep='systemctl hybrid-sleep'
sc-import-environment='sudo systemctl import-environment'
sc-is-active='systemctl is-active'
sc-is-enabled='systemctl is-enabled'
sc-is-failed='systemctl is-failed'
sc-is-system-running='systemctl is-system-running'
sc-isolate='sudo systemctl isolate'
sc-kexec='sudo systemctl kexec'
sc-kill='sudo systemctl kill'
sc-link='sudo systemctl link'
sc-list-dependencies='systemctl list-dependencies'
sc-list-jobs='systemctl list-jobs'
sc-list-machines='sudo systemctl list-machines'
sc-list-sockets='systemctl list-sockets'
sc-list-timers='systemctl list-timers'
sc-list-unit-files='systemctl list-unit-files'
sc-list-units='systemctl list-units'
sc-load='sudo systemctl load'
sc-mask='sudo systemctl mask'
sc-mask-now='sc-mask --now'
sc-poweroff='systemctl poweroff'
sc-preset='sudo systemctl preset'
sc-preset-all='sudo systemctl preset-all'
sc-reboot='systemctl reboot'
sc-reenable='sudo systemctl reenable'
sc-reload='sudo systemctl reload'
sc-reload-or-restart='sudo systemctl reload-or-restart'
sc-rescue='sudo systemctl rescue'
sc-reset-failed='sudo systemctl reset-failed'
sc-restart='sudo systemctl restart'
sc-revert='sudo systemctl revert'
sc-set-default='sudo systemctl set-default'
sc-set-environment='sudo systemctl set-environment'
sc-set-property='sudo systemctl set-property'
sc-show='systemctl show'
sc-show-environment='systemctl show-environment'
sc-start='sudo systemctl start'
sc-status='systemctl status'
sc-stop='sudo systemctl stop'
sc-suspend='systemctl suspend'
sc-switch-root='sudo systemctl switch-root'
sc-try-reload-or-restart='sudo systemctl try-reload-or-restart'
sc-try-restart='sudo systemctl try-restart'
sc-unmask='sudo systemctl unmask'
sc-unset-environment='sudo systemctl unset-environment'
scu-add-requires='systemctl --user add-requires'
scu-add-wants='systemctl --user add-wants'
scu-cancel='systemctl --user cancel'
scu-cat='systemctl --user cat'
scu-daemon-reexec='systemctl --user daemon-reexec'
scu-daemon-reload='systemctl --user daemon-reload'
scu-default='systemctl --user default'
scu-disable='systemctl --user disable'
scu-disable-now='scu-disable --now'
scu-edit='systemctl --user edit'
scu-emergency='systemctl --user emergency'
scu-enable='systemctl --user enable'
scu-enable-now='scu-enable --now'
scu-get-default='systemctl --user get-default'
scu-halt='systemctl --user halt'
scu-help='systemctl --user help'
scu-import-environment='systemctl --user import-environment'
scu-is-active='systemctl --user is-active'
scu-is-enabled='systemctl --user is-enabled'
scu-is-failed='systemctl --user is-failed'
scu-is-system-running='systemctl --user is-system-running'
scu-isolate='systemctl --user isolate'
scu-kexec='systemctl --user kexec'
scu-kill='systemctl --user kill'
scu-link='systemctl --user link'
scu-list-dependencies='systemctl --user list-dependencies'
scu-list-jobs='systemctl --user list-jobs'
scu-list-machines='systemctl --user list-machines'
scu-list-sockets='systemctl --user list-sockets'
scu-list-timers='systemctl --user list-timers'
scu-list-unit-files='systemctl --user list-unit-files'
scu-list-units='systemctl --user list-units'
scu-load='systemctl --user load'
scu-mask='systemctl --user mask'
scu-mask-now='scu-mask --now'
scu-preset='systemctl --user preset'
scu-preset-all='systemctl --user preset-all'
scu-reenable='systemctl --user reenable'
scu-reload='systemctl --user reload'
scu-reload-or-restart='systemctl --user reload-or-restart'
scu-rescue='systemctl --user rescue'
scu-reset-failed='systemctl --user reset-failed'
scu-restart='systemctl --user restart'
scu-revert='systemctl --user revert'
scu-set-default='systemctl --user set-default'
scu-set-environment='systemctl --user set-environment'
scu-set-property='systemctl --user set-property'
scu-show='systemctl --user show'
scu-show-environment='systemctl --user show-environment'
scu-start='systemctl --user start'
scu-status='systemctl --user status'
scu-stop='systemctl --user stop'
scu-switch-root='systemctl --user switch-root'
scu-try-reload-or-restart='systemctl --user try-reload-or-restart'
scu-try-restart='systemctl --user try-restart'
scu-unmask='systemctl --user unmask'
scu-unset-environment='systemctl --user unset-environment'
sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
sortnr='sort -n -r'
t='tail -f'
ta='tmux attach -t'
tad='tmux attach -d -t'
tkss='tmux kill-session -t'
tksv='tmux kill-server'
tl='tmux list-sessions'
tmux=_zsh_tmux_plugin_run
tmuxconf='$EDITOR $ZSH_TMUX_CONFIG'
ts='tmux new-session -s'
ttd='tt -csv >> ~/.local/share/wpm.csv'
unexport=unset
unmount='echo "Error: Try the command: umount" 1>&2; false'
urldecode='python3 -c "import sys; del sys.path[0]; import urllib.parse as up; print(up.unquote_plus(sys.argv[1]))"'
urlencode='python3 -c "import sys; del sys.path[0]; import urllib.parse as up; print(up.quote_plus(sys.argv[1]))"'
which-command=whence
you='if test "$EUID" = 0 ; then /sbin/yast2 online_update ; else su - -c "/sbin/yast2 online_update" ; fi'
z='sudo zypper'
zal='sudo zypper al'
zar='sudo zypper ar'
zas='sudo zypper as'
zcl='sudo zypper cl'
zdup='sudo zypper dup'
zh='zypper -h'
zhse='zypper -h se'
zif='zypper --no-refresh if'
zin='sudo zypper in'
zini=zi
zinit=zi
zinr='sudo zypper inr'
zlicenses='zypper licenses'
zll='zypper ll'
zlp='zypper lp'
zlr='zypper lr'
zls='zypper ls'
zlu='zypper lu'
zmr='sudo zypper mr'
zms='sudo zypper ms'
znr='sudo zypper nr'
zpa='zypper --no-refresh pa'
zpatch='sudo zypper patch'
zpatch-info='zypper --no-refresh patch-info'
zpattern-info='zypper --no-refresh pattern-info'
zpch='zypper --no-refresh pch'
zpchk='sudo zypper pchk'
zpd='zypper --no-refresh pd'
zplugin=zi
zproduct-info='zypper --no-refresh product-info'
zps='sudo zypper ps'
zpt='zypper --no-refresh pt'
zref='sudo zypper ref'
zrefs='sudo zypper refs'
zrl='sudo zypper rl'
zrm='sudo zypper rm'
zrr='sudo zypper rr'
zrs='sudo zypper rs'
zse='zypper --no-refresh se'
zshell='sudo zypper shell'
zshrc='${=EDITOR} ${ZDOTDIR:-$HOME}/.zshrc'
zsi='sudo zypper si'
zsource-download='sudo zypper source-download'
ztos='zypper tos'
zup='sudo zypper up'
zvcmp='zypper vcmp'
zve='sudo zypper ve'
zwp='zypper --no-refresh wp'

Options

noaliases             off
aliasfuncdef          off
allexport             off
noalwayslastprompt    off
alwaystoend           off
appendcreate          off
noappendhistory       off
autocd                on
autocontinue          off
noautolist            off
noautomenu            off
autonamedirs          off
noautoparamkeys       off
noautoparamslash      on
autopushd             on
noautoremoveslash     off
autoresume            off
nobadpattern          off
nobanghist            off
nobareglobqual        off
bashautolist          off
bashrematch           off
nobeep                off
nobgnice              on
braceccl              off
bsdecho               off
nocaseglob            off
nocasematch           off
casepaths             off
cbases                off
cdablevars            off
cdsilent              off
chasedots             off
chaselinks            off
nocheckjobs           off
nocheckrunningjobs    off
noclobber             off
clobberempty          off
combiningchars        off
completealiases       on
completeinword        off
continueonerror       off
correct               off
correctall            off
cprecedences          off
cshjunkiehistory      off
cshjunkieloops        off
cshjunkiequotes       off
cshnullcmd            off
cshnullglob           off
nodebugbeforecmd      off
dvorak                off
emacs                 off
noequals              off
errexit               off
errreturn             off
noevallineno          off
noexec                off
extendedglob          on
extendedhistory       off
noflowcontrol         off
forcefloat            off
nofunctionargzero     off
noglob                off
noglobalexport        off
noglobalrcs           off
globassign            off
globcomplete          off
globdots              off
globstarshort         off
globsubst             off
nohashcmds            off
nohashdirs            off
hashexecutablesonly   off
nohashlistall         off
histallowclobber      off
nohistbeep            off
histexpiredupsfirst   on
histfcntllock         off
histfindnodups        off
histignorealldups     on
histignoredups        on
histignorespace       on
histlexwords          off
histnofunctions       off
histnostore           off
histreduceblanks      on
nohistsavebycopy      off
histsavenodups        on
histsubstpattern      off
histverify            off
nohup                 on
ignorebraces          off
ignoreclosebraces     off
ignoreeof             off
incappendhistory      off
incappendhistorytime  off
interactive           on
interactivecomments   off
ksharrays             off
kshautoload           off
kshglob               off
kshoptionprint        off
kshtypeset            off
kshzerosubscript      off
nolistambiguous       off
nolistbeep            off
listpacked            off
listrowsfirst         off
nolisttypes           off
localloops            off
localoptions          off
localpatterns         off
localtraps            off
login                 on
longlistjobs          on
magicequalsubst       off
mailwarning           off
markdirs              off
menucomplete          off
monitor               off
nomultibyte           off
nomultifuncdef        off
nomultios             off
nonomatch             off
nonotify              off
nullglob              off
numericglobsort       off
octalzeroes           off
overstrike            off
pathdirs              off
pathscript            off
pipefail              off
posixaliases          off
posixargzero          off
posixbuiltins         off
posixcd               off
posixidentifiers      off
posixjobs             off
posixstrings          off
posixtraps            off
printeightbit         off
printexitvalue        off
privileged            off
promptbang            off
nopromptcr            off
nopromptpercent       off
nopromptsp            off
promptsubst           on
pushdignoredups       on
pushdminus            on
pushdsilent           on
pushdtohome           on
rcexpandparam         off
rcquotes              on
norcs                 off
recexact              on
rematchpcre           off
restricted            off
rmstarsilent          off
rmstarwait            off
sharehistory          off
shfileexpansion       off
shglob                off
shinstdin             on
shnullcmd             off
shoptionletters       off
noshortloops          off
shortrepeat           off
shwordsplit           off
singlecommand         off
singlelinezle         off
sourcetrace           off
sunkeyboardhack       off
transientrprompt      off
trapsasync            off
typesetsilent         off
typesettounset        off
nounset               off
verbose               off
vi                    off
warncreateglobal      off
warnnestedvar         off
xtrace                off
zle                   off

I suspect the L alias is the issue. If you unset it, what happens?

No change in the behaviour

that's a lot of aliases and some of them are overwriting standard commands; could you try disabling them all, just to be sure if it's an alias causing the problem?

Hi @ljharb, I appear to have this same problem too. I have just rebuilt my linux environment on ubuntu/wsl2 and trying to install any nodejs version appears not to be able to install from binaries anymore (I'm also using zsh). (I have tried versions: lastest, 16.19.0, 18.13.0) I am not sure whih version I should be installing (1 for which pre built binaries are alread available, for ubuntu 20.04). Perhaps the linux version is too old and that the pre-built bersions are not available for 20.24. I have no clue, I'm just speculating due to lack of information. How can I list the version of nodejs that are available to install for my current version of Linux?, thanks.

I don’t believe there are any prebuilt binaries on Ubuntu. You can browse https://nodejs.org/dist to see what’s there.

Ok thanks @ljharb. I found what was causing this problem, its the common-aliases zsh plugin, which contains a rogue alias of L. I just removed that alias, and all is now fine, I can install versions of node from binaries, instead of building from source. I found this from issue #2963. Perhaps one of these issues needs to be pinned, so others can find this workaround more easily.

Yes, indeed, that makes this a duplicate of #2963.

oh wait, sorry, you're not the OP :-)

Even after unsetting L as an alias, it still fails

I tried in zsh --no-rc, and it works, but I still don't know why it doesn't happen with v0.39.1 in my regular environment

I am closing for now as not planned and when I'll have time, I'll bisect it, try to find the issue and post it here

My ideal would be finding a way to ignore zsh global aliases, otherwise it’ll be an eternal game of whack-a-mole trying to avoid colliding with whatever common aliases a zsh plugin chooses, but we could certainly rename things in the interim.

@ljharb

Result of my bisection :

fb4538b is the first faulty commit, and indeed L variable has been introduced

Doing local L in my shell indeed prints the whole shell config

@ljharb After reading the code, I fail to understand the exact usage for that variable

Why are you needing to parse ls? To get the destination of a symlink, parsing ls is never a good idea, and readlink is the standard utility for it.

od resolves symlinks itself (and did since forever), eliminating the manual step of resolving a symlink

https://github.com/coreutils/coreutils/blob/d5868df0d0a6bd09387ece41b62b873fd7c201f9/src/od.c#L925

My ideal would be finding a way to ignore zsh global aliases, otherwise it’ll be an eternal game of whack-a-mole trying to avoid colliding with whatever common aliases a zsh plugin chooses, but we could certainly rename things in the interim.

This is definitely possible, zsh manual on options §16.2.6, adding set -o ALIASES, but it may cause other issues down the line, with L it will fail with zsh: parse error

There is also the issue that bash doesn't support it and I don't know how a set will react in a sourced script compared to a executed script

We can easily conditionally run the set only in zsh; we already do that in a number of places for all the ways zsh violates posix. Can you elaborate on what you mean by the parse error?