Skip to content

Warn if command-not-found because it's not executable #8804

@EdmundsEcho

Description

@EdmundsEcho

I have several directories in my PATH. I can see the path required to access the binary of interest. For some reason, I cannot get fish to find the binary.

The PATH

The path of interest is /opt/homebrew/bin

echo $PATH
/Users/edmund/.asdf/shims /Users/edmund/.asdf/bin /Users/edmund/.local/share/nvm/v16.14.1/bin /Users/edmund/.deno/bin /Users/edmund/.yarn/bin /Users/edmund/.local/bin /opt/homebrew/opt/llvm/bin /Users/edmund/.pyenv/shims /Users/edmund/.pyenv/bin /opt/homebrew/sbin **/opt/homebrew/bin** /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Users/edmund/.krew/bin /Users/edmund/.ghcup/bin /Users/edmund/.cargo/bin /opt/homebrew/opt/findutils/libexec/gnubin /opt/homebrew/opt/make/libexec/gnubin /opt/homebrew/opt/gawk/libexec/gnubin /opt/homebrew/opt/gsed/libexec/gnubin /opt/homebrew/opt/gnu-sed/libexec/gnubin /opt/homebrew/opt/grep/libexec/gnubin /opt/homebrew/opt/ed/libexec/gnubin /opt/homebrew/opt/gnu-tar/libexec/gnubin /opt/homebrew/opt/coreutils/libexec/gnubin /opt/homebrew/opt/libtool/libexec/gnubin

The content of that path

Note the presence of yarn

> ls /opt/homebrew/bin | ggrep yarn
yarn
yarnpkg

Fish not finding the binary

> yarn
fish: Unknown command: yarn

> which yarn
<empty line>

Other binaries can be found...

Fish can find other binaries in the same path (e.g., jq is in the directory)

> ls /opt/homebrew/bin | ggrep jq
jq

> which jq
/opt/homebrew/bin/jq

The question

What might prevent fish from finding the binary? (in this case yarn). How might I go about problem solving this?

Thank you in advance.

- E

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions