1.. default-role:: code
2
3:index:`whence` -- locate a command and describe its type
4=========================================================
5
6Synopsis
7--------
8| whence [flags] name...
9
10Description
11-----------
12Without `-v`, `whence` writes on standard output an absolute pathname,
13if any, corresponding to *name* based on the complete search order that
14the shell uses.  If *name* is not found, then no output is produced.
15
16If `-v` is specified, the output will also contain information that
17indicates how the given *name* would be interpreted by the shell in
18the current execution environment.
19
20Flags
21-----
22:-p, -P: Do not check to see if *name* is a reserved word, a built-in,
23   an alias, or a function.  This turns off the `-v` option.
24
25:-a: Displays all uses for each *name* rather than the first.
26
27:-f: Do not check for functions.
28
29:-t: Output only the type for each command.
30
31:-q: Quiet mode. Returns 0 if all arguments are built-ins, functions,
32   or are programs found on the path.
33
34:-v: For each name you specify, the shell displays a line that indicates
35   if that name is one of the following:
36
37   * Reserved word
38   * Alias
39   * Built-in
40   * Undefined function
41   * Function
42   * Tracked alias
43   * Program
44
45Exit Status
46-----------
47:0: Each *name* was found by the shell.
48
49:1: One or more *name*\s were not found by the shell.
50
51:>1: An error occurred.
52
53See Also
54--------
55`command`\(1)
56