New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a --quiet
/-q
option for command -s
#3591
Conversation
As I read this, this still accepts "-q" without "-s" as a noop. Personally, I'm okay with that, but there might be reasons to error out - I think @krader1961 likes behavior like that. |
No, that's an error and the help is printed. edit: oops, I hit the close pull request instead of the green comment button. |
( This function here only does the argument handling aspect of the builtin, outside the parser, and it already was causing errors unless |
I think devnull'ing this builtin to check presence is a common enough chore that a --quiet option which works like it does on `type` would be handy.
This was a new addition to provide a simple way of checking whether a command exists in scripts. See: fish-shell/fish-shell#3591
How does this compare to |
Using |
Description
I think devnull'ing
command -v program_name
to check presence is a commonenough chore that a
--quiet
option which works like it does ontype
would be handy for writers of shell scripts. Simply mutes the output for checking the exit status.command -qs foo
should behave identically tocommand -s foo >/dev/null
,command -v foo >/dev/null
Includes updated documentation.