diff options
author | axel <axel@liljencrantz.se> | 2006-07-13 03:46:55 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-07-13 03:46:55 +1000 |
commit | 4a87c9895dd35426d872466b8313bc45e7e2867e (patch) | |
tree | 8de48c44ce93926f9ba1281ba680f8d4f74e89a7 /doc_src/functions.txt | |
parent | 036cc4e0faccc9b03e2c73b34dd4ad6a0223837b (diff) |
Add -q/--query switch to the functions builtin. Works just like the same switch to set does. Useful for checking for the existance of functions in a script
darcs-hash:20060712174655-ac50b-14a98a15751bb5ddddf4ffb41521b616bef5e40c.gz
Diffstat (limited to 'doc_src/functions.txt')
-rw-r--r-- | doc_src/functions.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/doc_src/functions.txt b/doc_src/functions.txt index 9def5791..64294782 100644 --- a/doc_src/functions.txt +++ b/doc_src/functions.txt @@ -12,11 +12,16 @@ This builtin command is used to print or erase functions. - <code>-e</code> or <code>--erase</code> causes the specified functions to be erased. - <code>-h</code> or <code>--help</code> display a help message and exit - <code>-n</code> or <code>--names</code> list only the names of all defined functions +- <code>-q</code> or <code>--query</code> test if the specified functions exist. Does not output anything, but the builtins exit status is the number of functions specified that were not defined. -If \c functions is called with no arguments, the names and definition -of all functions are printed, otherwise, the specified function -definitions will be printed. +The default behavior of \c functions when called with no arguments, +is to print the names and definitions of all defined functions. If any +non-switch parameters are given, only the definition of the specified +functions are printed. -If a function is automatically loaded, using <code>functions -e</code> -to erase it will not remove the function. +Automatically loaded functions can not be removed using functions +-e. Either remove the definition file or change the +$fish_function_path variable to remove autoloaded functions. +The exit status of the functions builtin is the number functions +specified in the argument list that do not exist. |