GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
COMMAND(1) fish-shell COMMAND(1)

command - run a program

command [OPTIONS] COMMANDNAME [ARGS...]


command forces the shell to execute the program COMMANDNAME and ignore any functions or builtins with the same name.

The following options are available:

  • -a or --all returns all the external COMMANDNAMEs that are found in $PATH in the order they are found.
  • -q or --query, silences the output and prints nothing, setting only the exit status. Implies --search. For compatibility with old fish versions this is also --quiet (but this is deprecated).
  • -s or --search returns the name of the external command that would be executed, or nothing if no file with the specified name could be found in the $PATH.

With the -s option, command treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found. Additionally passing a -q or --quiet option prevents any paths from being printed, like type -q, for testing only the exit status.

For basic compatibility with POSIX command, the -v flag is recognized as an alias for -s.

command ls causes fish to execute the ls program, even if an ls function exists.

command -s ls returns the path to the ls program.

command -q git; and command git log runs git log only if git exists.

2021, fish-shell developers
April 9, 2022 3.3

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.