mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
bfd3a47380
Stop using getopt to parse flags. It's far more expensive than necessary, and results in long flags not being parsed on OS X. This also allows args starting with - after the options list to be properly interpreted as a value to test. Print the error message to stderr as is appropriate. Use the new `command -p` functionality when the -a flag has not been provided (`command` does not have any equivalent to the -a flag), instead of using `which`. This is faster and also avoids any possible disagreement between `which` and what fish thinks is valid. Stop testing every path to see if it's executable, that test has already been done by `which` or `command -p`. The end result is `type -P ls` is roughly 250% faster, according to profiling, on my OS X machine. |
||
---|---|---|
.. | ||
completions | ||
functions | ||
tools | ||
config.fish |