What is the order for "type -a"? #10297
-
This is the output when I do
Does fish sort them in any particular order? Which |
Beta Was this translation helpful? Give feedback.
Answered by
faho
Feb 13, 2024
Replies: 1 comment
-
Functions beat builtins beat commands, so that's the order type uses. The first one it prints is also the one that runs, unless you decorate it like If |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YousufSSyed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Functions beat builtins beat commands, so that's the order type uses.
The first one it prints is also the one that runs, unless you decorate it like
command type
(which runs /usr/bin/type) orbuiltin type
(which runs the builtin, ignoring any functions if you have any).If
type -a type
ran the type command it could not tell you about the builtins - they only exist inside the shell