diff options
Diffstat (limited to 'doc_src/complete.txt')
-rw-r--r-- | doc_src/complete.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/doc_src/complete.txt b/doc_src/complete.txt index cb4e6bde..c1422825 100644 --- a/doc_src/complete.txt +++ b/doc_src/complete.txt @@ -50,21 +50,29 @@ When erasing completions, it is possible to either erase all completions for a s The short style option `-o` for the `gcc` command requires that a file follows it. This can be done using writing: -`complete -c gcc -s o -r` +\fish +complete -c gcc -s o -r +\endfish The short style option `-d` for the `grep` command requires that one of the strings '`read`', '`skip`' or '`recurse`' is used. This can be specified writing: -`complete -c grep -s d -x -a "read skip recurse"` +\fish +complete -c grep -s d -x -a "read skip recurse" +\endfish The `su` command takes any username as an argument. Usernames are given as the first colon-separated field in the file /etc/passwd. This can be specified as: -`complete -x -c su -d "Username" -a "(cat /etc/passwd | cut -d : -f 1)"` +\fish +complete -x -c su -d "Username" -a "(cat /etc/passwd | cut -d : -f 1)" +\endfish The `rpm` command has several different modes. If the `-e` or `--erase` flag has been specified, `rpm` should delete one or more packages, in which case several switches related to deleting packages are valid, like the `nodeps` switch. This can be written as: -`complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d "Don't check dependencies"` +\fish +complete -c rpm -n "__fish_contains_opt -s e erase" -l nodeps -d "Don't check dependencies" +\endfish where `__fish_contains_opt` is a function that checks the commandline buffer for the presence of a specified set of options. |