Closed madonuko closed 2 months ago
nvm doesn't run any pager at all. however, i see you've aliased grep
to egrep --color=auto'
, and rm
to rm --interactive=never
, and mkdir
to nocorrect mkdir
- so i suspect that perhaps there's some shell aliases you've set up that are causing issues.
I thought nocorrect mkdir
is a thing that zsh
aliases to automatically? I've also checked my config files and grep most ~/.zshrc
returns nothing…
Maybe oh-my-zsh? zsh doesn't alias anything automatically.
The lines that are erroring about most
are in the nvm_wrap_with_color_code
function - so i suspect it's related to colorized output somehow.
Are you using global zsh aliases perhaps? Those are hugely problematic and might not be something nvm can work around.
I guess it's an issue with OMZ:
/home/mado/.oh-my-zsh/plugins/common-aliases/common-aliases.plugin.zsh
7:alias la='ls -lAFh' #long list,show almost all,show type,human readable
30:alias -g M="| most"
this is the output from rg most ~/.oh-my-zsh
(truncated)
and in the file:
25 │ # Command line head / tail shortcuts
26 │ alias -g H='| head'
27 │ alias -g T='| tail'
28 │ alias -g G='| grep'
29 │ alias -g L="| less"
30 │ alias -g M="| most"
31 │ alias -g LL="2>&1 | less"
32 │ alias -g CA="2>&1 | cat -A"
33 │ alias -g NE="2> /dev/null"
34 │ alias -g NUL="> /dev/null 2>&1"
35 │ alias -g P="2>&1| pygmentize -l pytb"
that seems to be the issue (maybe something using M
)
yup, that's exactly the issue. all of those global zsh aliases are impossible to avoid.
I'd suggest disabling omz entirely anyways, zsh folks tend to discourage it.
I see, kinda dug into the code, adding single quotes around them doesn't even help at all, pretty surprising.
Anyway, thanks for looking into this.
Operating system and version:
nvm debug
output:nvm ls
output:How did you install
nvm
?Install script from README.
What steps did you perform?
nvm
What happened?
It seems to run the
most
pager which is not installed on my system. Seems to be a bad idea, not all distros includemost
, should usemore
(orless
) instead.What did you expect to happen?
Output without errors.
Is there anything in any of your profile files that modifies the
PATH
?.zshrc
: