From eb40baacfc74b7962eeef3d25ccea0046f5ec1ef Mon Sep 17 00:00:00 2001 From: David Adam Date: Wed, 17 Sep 2014 10:17:48 +0800 Subject: update completions for builtin commands --- share/completions/command.fish | 1 + share/completions/commandline.fish | 4 ++++ share/completions/complete.fish | 1 + share/completions/echo.fish | 3 +++ share/completions/fish.fish | 1 + share/completions/function.fish | 1 + share/completions/functions.fish | 1 + share/completions/history.fish | 2 ++ share/completions/read.fish | 2 ++ share/completions/set_color.fish | 2 -- share/completions/status.fish | 3 +++ share/completions/test.fish | 2 -- share/completions/trap.fish | 1 + share/completions/type.fish | 1 + 14 files changed, 21 insertions(+), 4 deletions(-) diff --git a/share/completions/command.fish b/share/completions/command.fish index 53d27f7f..c36b60c3 100644 --- a/share/completions/command.fish +++ b/share/completions/command.fish @@ -1,3 +1,4 @@ complete -c command -s h -l help --description 'Display help and exit' +complete -c command -s s -l search --description 'Print the file that would be executed' complete -c command --description "Command to run" -xa "(__fish_complete_subcommand)" diff --git a/share/completions/commandline.fish b/share/completions/commandline.fish index c30b4413..890a9240 100644 --- a/share/completions/commandline.fish +++ b/share/completions/commandline.fish @@ -15,5 +15,9 @@ complete -c commandline -s o -l tokenize --description "Print each token on a se complete -c commandline -s I -l input --description "Specify command to operate on" complete -c commandline -s C -l cursor --description "Set/get cursor position, not buffer contents" +complete -c commandline -s L -l line --description "Print the line that the cursor is on" +complete -c commandline -s S -l search-mode --description "Return true if performing a history search" +complete -c commandline -s P -l paging-mode --description "Return true if showing pager content" + complete -c commandline -n __fish_commandline_test -a '(bind --function-names)' -d 'Function name' -x diff --git a/share/completions/complete.fish b/share/completions/complete.fish index ebd6d72f..c9a9933e 100644 --- a/share/completions/complete.fish +++ b/share/completions/complete.fish @@ -13,3 +13,4 @@ complete -c complete -s e -l erase --description "Remove completion" complete -c complete -s h -l help --description "Display help and exit" complete -c complete -s C -l do-complete --description "Print all completions for the specified commandline" complete -c complete -s n -l condition --description "The completion should only be used if the specified command has a zero exit status" -r +complete -c complete -s w -l wraps --description "Inherit completions from the specified command" diff --git a/share/completions/echo.fish b/share/completions/echo.fish index b096271a..28ffa03e 100644 --- a/share/completions/echo.fish +++ b/share/completions/echo.fish @@ -1,3 +1,6 @@ complete -c echo -s n --description "Do not output a newline" complete -c echo -s s --description "Do not separate arguments with spaces" +complete -c echo -s E --description "Disable backslash escapes" +complete -c echo -s e --description "Enable backslash escapes" +complete -c echo -s h -l help --description "Display help and exit" complete -c echo -u diff --git a/share/completions/fish.fish b/share/completions/fish.fish index 91b7f704..70642d84 100644 --- a/share/completions/fish.fish +++ b/share/completions/fish.fish @@ -5,3 +5,4 @@ complete -c fish -s n -l no-execute --description "Only parse input, do not exec complete -c fish -s i -l interactive --description "Run in interactive mode" complete -c fish -s l -l login --description "Run in login mode" complete -c fish -s p -l profile --description "Output profiling information to specified file" -f +complete -c fish -s d -l debug --description "Run with the specified verbosity level" diff --git a/share/completions/function.fish b/share/completions/function.fish index bfa811e8..6328b9c0 100644 --- a/share/completions/function.fish +++ b/share/completions/function.fish @@ -8,3 +8,4 @@ complete -c function -s v -l on-variable --description "Make the function a vari complete -c function -s e -l on-event --description "Make the function a generic event handler" -xa 'fish_prompt fish_command_not_found' complete -c function -s a -l argument-names --description "Specify named arguments" complete -c function -s S -l no-scope-shadowing --description "Do not shadow variable scope of calling function" +complete -c function -s w -l wraps --description "Inherit completions from the given command" diff --git a/share/completions/functions.fish b/share/completions/functions.fish index 9315963e..341c060a 100644 --- a/share/completions/functions.fish +++ b/share/completions/functions.fish @@ -5,3 +5,4 @@ complete -c functions -s h -l help --description "Display help and exit" complete -c functions -s d -l description --description "Set function description" -x complete -c functions -s q -l query --description "Test if function is defined" complete -c functions -s n -l names --description "List the names of the functions, but not their definition" +complete -c functions -s c -l copy --description "Copy the specified function to the specified new name" diff --git a/share/completions/history.fish b/share/completions/history.fish index e2e5c11a..d1255d49 100644 --- a/share/completions/history.fish +++ b/share/completions/history.fish @@ -3,3 +3,5 @@ complete -c history -r -l contains --description "Match history items that conta complete -c history -l search --description "Print matching history items, which is the default behavior" complete -c history -l delete --description "Interactively delete matching history items" complete -c history -l clear --description "Clear your entire history" +complete -c history -l merge --description "Incorporate history changes from other sessions" +# --save is not completed; it is for internal use diff --git a/share/completions/read.fish b/share/completions/read.fish index fb43d253..0888f078 100644 --- a/share/completions/read.fish +++ b/share/completions/read.fish @@ -8,3 +8,5 @@ complete -c read -s u -l unexport --description "Do not export variable to subpr complete -c read -s m -l mode-name --description "Name to load/save history under" -r -a "read fish" complete -c read -s c -l command --description "Initial contents of read buffwhen reading interactively" complete -c read -s s -l shell --description "Use syntax highlighting, tab completions and command termination suitable for entering shellscript code" +complete -c read -s n -l nchars --description "Read the specified number of characters" +complete -c read -s a -l array --description "Store the results as an array" diff --git a/share/completions/set_color.fish b/share/completions/set_color.fish index 09bf1218..55ea4b1e 100644 --- a/share/completions/set_color.fish +++ b/share/completions/set_color.fish @@ -2,7 +2,5 @@ complete -c set_color -x --description "Color" -a '(set_color --print-colors)' complete -c set_color -s b -l background -x -a '(set_color --print-colors)' --description "Change background color" complete -c set_color -s o -l bold --description 'Make font bold' complete -c set_color -s u -l underline --description 'Underline text' -complete -c set_color -s v -l version --description 'Display version and exit' complete -c set_color -s h -l help --description 'Display help and exit' complete -c set_color -s c -l print-colors --description 'Print a list of all accepted color names' - diff --git a/share/completions/status.fish b/share/completions/status.fish index dc98703a..56dabc86 100644 --- a/share/completions/status.fish +++ b/share/completions/status.fish @@ -9,3 +9,6 @@ complete -c status -l is-interactive-job-control --description "Test if only int complete -c status -l is-no-job-control --description "Test if new jobs are never put under job control" complete -c status -s j -l job-control -xa "full interactive none" --description "Set which jobs are out under job control" complete -c status -s t -l print-stack-trace --description "Print a list of all function calls leading up to running the current command" +complete -c status -s f -l current-filename --description "Print the filename of the currently running script" +complete -c status -s n -l current-line-number --description "Print the line number of the currently running script" +complete -c status -s t -l print-stack-trace --description "Prints a trace of all function calls on the stack" diff --git a/share/completions/test.fish b/share/completions/test.fish index 5ce76809..90de3e2f 100644 --- a/share/completions/test.fish +++ b/share/completions/test.fish @@ -23,9 +23,7 @@ complete -c test -s d --description "File is directory" complete -c test -s e --description "File exists" complete -c test -s f --description "File is regular" complete -c test -s g --description "File is set-group-ID" -complete -c test -s h --description "File is symlink" complete -c test -s G --description "File owned by effective group ID" -complete -c test -s k --description "File has sticky bit set" complete -c test -s L --description "File is symlink" complete -c test -s O --description "File owned by effective user ID" complete -c test -s p --description "File is named pipe" diff --git a/share/completions/trap.fish b/share/completions/trap.fish index 20b6d9ec..93786a56 100644 --- a/share/completions/trap.fish +++ b/share/completions/trap.fish @@ -2,3 +2,4 @@ complete -c trap -s l -l list-signals --description 'Display names of all signals' complete -c trap -s p -l print --description 'Display all currently defined trap handlers' complete -c trap -s h -l help --description 'Display help and exit' +complete -c trap -a '(trap -l | sed "s/ /\n/g")' --description 'Signal' diff --git a/share/completions/type.fish b/share/completions/type.fish index c5233057..7f716968 100644 --- a/share/completions/type.fish +++ b/share/completions/type.fish @@ -5,6 +5,7 @@ complete -c type -s f -l no-functions --description "Suppress function and built complete -c type -s t -l type --description "Print command type" complete -c type -s p -l path --description "Print path to command, or nothing if name is not a command" complete -c type -s P -l force-path --description "Print path to command" +complete -c type -s q -l quiet --description "Suppress output" complete -c type -a "(builtin -n)" --description "Builtin" complete -c type -a "(functions -n)" --description "Function" -- cgit v1.2.3