Closed swrenn closed 4 years ago
Thanks for the report!
command
is one of the zsh builtin commands, so I would expect this to work as long as /usr/bin
has not been removed from your path.
What is the output of running these two commands in your terminal?
echo $PATH
# --
# edit: probably enough to specifically check whether /usr/bin is in PATH:
typeset -a path_segments=( ${(s.:.)"$(echo $PATH)"} ) && echo $path_segments[(I)/usr/bin]
and
where command
Also what system are you on? How about you @sean-brandt?
XXX@abyss ~
λ uname -a
Linux abyss 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
XXX@abyss ~
λ where command
command: shell built-in command
XXX@abyss ~
λ \command \command
zsh: command not found: command
XXX@abyss ~
λ echo $ZSH_VERSION
5.8
XXX@abyss ~
λ echo $PATH |sed -e s/yyy/XXX/g
/home/XXX/.rbenv/shims:/home/XXX/.rbenv/bin:/home/XXX/.zinit/plugins/laggardkernel---git-ignore/bin:/home/XXX/.rbenv/shims:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/bin:/usr/local/sbin:/home/XXX/.zinit/plugins/dandavison---delta/delta:/home/XXX/.zinit/plugins/BurntSushi---ripgrep/rg:/home/XXX/.zinit/plugins/sharkdp---bat/bat:/home/XXX/.rbenv/bin:/home/XXX/.zinit/polaris/bin:/home/XXX/anaconda3/condabin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/XXX/Code/Go/bin:/home/XXX/.dotfiles/bin:/home/XXX/bin:/home/XXX/.zinit/plugins/unixorn---git-extra-commands/bin:/home/XXX/.zinit/plugins/zpm-zsh---colorize/bin:/home/XXX/.zinit/plugins/reegnz---jq-zsh-plugin/bin:/home/XXX/.zinit/plugins/droctothorpe---kubecolor/bin:/home/XXX/.zinit/plugins/zpm-zsh---tmux/bin:/home/XXX/.zinit/plugins/unixorn---git-extra-commands/bin:/home/XXX/.zinit/plugins/zpm-zsh---colorize/bin:/home/XXX/.zinit/plugins/reegnz---jq-zsh-plugin/bin:/home/XXX/.zinit/plugins/droctothorpe---kubecolor/bin:/home/XXX/.zinit/plugins/zpm-zsh---tmux/bin
➜ ~ uname -a
Linux pop-os 5.4.0-7626-generic #30~1588169883~20.04~bbe668a-Ubuntu SMP Wed Apr 29 21:00:02 UTC x86_64 x86_64 x86_64 GNU/Linux
➜ ~ echo $ZSH_VERSION
5.8
➜ ~ where command
command: shell built-in command
➜ ~ echo $PATH | tr : '\n'
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
[others...]
Thanks. Interesting, on macOS I get
% where command
command: shell built-in command
/usr/bin/command
I'll see what I can come up with.
Should be fixed in master
, let me know. Can cut a release for package manager users tomorrow
I just pulled and tested. No errors.
P.S. Thanks for building this extension.
Released in 3.3.1, and now I have a Linux testing setup so hope to catch little platform differences like this going forward.
Glad you find it useful!
EDIT 2024: this issue still gets some traffic. Maybe it's just bots and scrapers. If you are a human and get this bug still, please let me know.
Belatedly acknowledging more contributors in https://github.com/olets/zsh-abbr#community and https://zsh-abbr.olets.dev/community/
Would you like to be added @swrenn ? If so, I'll have the all-contributors bot open a pull request. Then I'll tag you in it to review for correct info
same for @seanb4t
Your recent change 0311ecf added these lines to zsh-addr.zsh:
This causes the error in the title because I don't have a binary called 'command' in my path.