Skip to content

Commit 5adc07b

Browse files
committed
Document new type -p support for functions
1 parent d651cda commit 5adc07b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc_src/type.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following options are available:
1717

1818
- `-t` or `--type` prints `function`, `builtin`, or `file` if `NAME` is a shell function, builtin, or disk file, respectively.
1919

20-
- `-p` or `--path` returns the name of the disk file that would be executed, or nothing if `type -t name` would not return `file`.
20+
- `-p` or `--path` prints the path to `NAME` if `NAME` resolves to an executable file in <tt>$PATH</tt>, the path to the script containing the definition of the function `NAME` if `NAME` resolves to a function loaded from a file on disk (i.e. not interactively defined at the prompt), or nothing otherwise.
2121

2222
- `-P` or `--force-path` returns the path to the executable file `NAME`, presuming `NAME` is found in <tt>$PATH</tt>, or nothing otherwise. `--force-path` explicitly resolves only the path to executable files in <tt>$PATH</tt>, regardless of whether `$NAME` is shadowed by a function or builtin with the same name.
2323

0 commit comments

Comments
 (0)