update completions for builtin commands

This commit is contained in:
David Adam 2014-09-17 10:17:48 +08:00
parent 133ba6e01b
commit eb40baacfc
14 changed files with 21 additions and 4 deletions

View file

@ -1,3 +1,4 @@
complete -c command -s h -l help --description 'Display help and exit' 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)" complete -c command --description "Command to run" -xa "(__fish_complete_subcommand)"

View file

@ -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 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 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 complete -c commandline -n __fish_commandline_test -a '(bind --function-names)' -d 'Function name' -x

View file

@ -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 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 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 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"

View file

@ -1,3 +1,6 @@
complete -c echo -s n --description "Do not output a newline" 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 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 complete -c echo -u

View file

@ -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 i -l interactive --description "Run in interactive mode"
complete -c fish -s l -l login --description "Run in login 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 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"

View file

@ -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 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 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 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"

View file

@ -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 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 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 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"

View file

@ -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 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 delete --description "Interactively delete matching history items"
complete -c history -l clear --description "Clear your entire history" 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

View file

@ -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 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 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 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"

View file

@ -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 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 o -l bold --description 'Make font bold'
complete -c set_color -s u -l underline --description 'Underline text' 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 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' complete -c set_color -s c -l print-colors --description 'Print a list of all accepted color names'

View file

@ -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 -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 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 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"

View file

@ -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 e --description "File exists"
complete -c test -s f --description "File is regular" complete -c test -s f --description "File is regular"
complete -c test -s g --description "File is set-group-ID" 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 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 L --description "File is symlink"
complete -c test -s O --description "File owned by effective user ID" complete -c test -s O --description "File owned by effective user ID"
complete -c test -s p --description "File is named pipe" complete -c test -s p --description "File is named pipe"

View file

@ -2,3 +2,4 @@
complete -c trap -s l -l list-signals --description 'Display names of all signals' 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 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 -s h -l help --description 'Display help and exit'
complete -c trap -a '(trap -l | sed "s/ /\n/g")' --description 'Signal'

View file

@ -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 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 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 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 "(builtin -n)" --description "Builtin"
complete -c type -a "(functions -n)" --description "Function" complete -c type -a "(functions -n)" --description "Function"