Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurs when attempting to get installed list using the tab key in omz #3256

Closed
Seize-cf opened this issue Dec 28, 2023 · 7 comments
Closed

Comments

@Seize-cf
Copy link

Seize-cf commented Dec 28, 2023

Operating system and version:

ProductName:		macOS
ProductVersion:		14.1
BuildVersion:		23B74

nvm debug output:

nvm --version: v0.39.7
$SHELL: /bin/zsh
$SHLVL: 1
whoami: 'jh.tang'
${HOME}: /Users/jh.tang
${NVM_DIR}: '${HOME}/.nvm'
${PATH}: ${NVM_DIR}/versions/node/v16.14.0/bin:${HOME}/.local/share/zinit/polaris/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/aria2/bin:/usr/local/go/bin:${HOME}/.cargo/bin:${HOME}/WebstormProjects/marketing.automizely.com/node_modules/.bin:${HOME}/.orbstack/bin
$PREFIX: ''
${NPM_CONFIG_PREFIX}: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.9 (x86_64-apple-darwin23.0)'
uname -a: 'Darwin 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64'
checksum binary: 'shasum'
OS version: macOS 14.1 23B74
awk: /usr/bin/awk, awk version 20200816
curl: /usr/bin/curl, curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1
wget: /usr/local/bin/wget, GNU Wget 1.21.4 在 darwin22.4.0 上编译。
sed: /usr/bin/sed
cut: /usr/bin/cut
basename: /usr/bin/basename
rm: /bin/rm
mkdir: /bin/mkdir
xargs: /usr/bin/xargs
git: /usr/local/bin/git, git version 2.43.0
ls: grep:: No such file or directory
grep: grep: aliased to grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}), grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
nvm current: v16.14.0
which node: ${NVM_DIR}/versions/node/v16.14.0/bin/node
which iojs: iojs not found
which npm: ${NVM_DIR}/versions/node/v16.14.0/bin/npm
npm config get prefix: ${NVM_DIR}/versions/node/v16.14.0
npm root -g: ${NVM_DIR}/versions/node/v16.14.0/lib/node_modules

nvm ls output:

       v10.15.0
       v12.22.5
       v14.15.0
       v14.17.5
       v14.18.1
       v14.19.1
       v14.20.0
       v16.13.0
->     v16.14.0
       v16.16.0
       v16.17.0
       v16.20.2
       v18.12.1
       v18.16.1
       v18.17.1
       v18.18.2
       v18.19.0
        v20.9.0
         system
default -> v16.14.0
bff -> v14.20.0
old -> v14.18.1
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v20.9.0) (default)
stable -> 20.9 (-> v20.9.0) (default)
lts/* -> lts/iron (-> 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.3 (-> N/A)
lts/gallium -> v16.20.2
lts/hydrogen -> v18.19.0
lts/iron -> v20.10.0 (-> N/A)

How did you install nvm?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

What steps did you perform?

When I try to use

nvm use

and press the TAB key
getting this error

~                                                                                                                                  15:07:51
❯ nvm use lUsage: add-zsh-hook hook function
Valid hooks are:
  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name
add-zsh-hook:shift:55: shift count must be <= $#
Usage: add-zsh-hook hook function
Valid hooks are:
  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name
ts/

What happened?

❯ nvm use Usage: add-zsh-hook hook function
Valid hooks are:
  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name
add-zsh-hook:shift:55: shift count must be <= $#
Usage: add-zsh-hook hook function
Valid hooks are:
  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name
                      
bff           lts/erbium    system        v14.20.0      v18.17.1    
default       lts/fermium   unstable      v16.13.0      v18.18.2    
iojs          lts/gallium   v10.15.0      v16.14.0      v18.19.0    
lts/\*        lts/hydrogen  v12.22.5      v16.16.0      v20.9.0     
lts/argon     lts/iron      v14.15.0      v16.17.0                  
lts/boron     node          v14.17.5      v16.20.2                  
lts/carbon    old           v14.18.1      v18.12.1                  
lts/dubnium   stable        v14.19.1      v18.16.1       

add-zsh-hook error

What did you expect to happen?

show installed list without any error

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

No

@ljharb
Copy link
Member

ljharb commented Dec 28, 2023

How are you installing autocompletion?

@Seize-cf
Copy link
Author

Seize-cf commented Dec 28, 2023

How are you installing autocompletion?

by using zinit

### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
    print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
    command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
    command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
        print -P "%F{33} %F{34}Installation successful.%f%b" || \
        print -P "%F{160} The clone has failed.%f%b"
fi

source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit

zinit light zdharma-continuum/fast-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light ael-code/zsh-colored-man-pages
zinit light MichaelAquilina/zsh-you-should-use
zinit light Pilaton/OhMyZsh-full-autoupdate
zinit snippet OMZP::git
zinit snippet OMZP::z
zinit snippet OMZP::sudo
zinit snippet OMZP::history

@Gary19751957

This comment was marked as spam.

@ljharb
Copy link
Member

ljharb commented Dec 28, 2023

I don’t see nvm’s autocomplete in there at all.

@vladdoster
Copy link

I don’t see nvm’s autocomplete in there at all.

It is handled by the oh-my-zsh nvm plugin.

@vladdoster

This comment was marked as off-topic.

@ljharb
Copy link
Member

ljharb commented Mar 21, 2024

Sounds like that plugin needs this issue, then.

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants