completion: adopt commandline -x replacing deprecated -o

This gives us more accurate completions because completion scripts get
expanded paths
This commit is contained in:
Johannes Altmanninger
2024-01-22 07:42:45 +01:00
parent 798527d79a
commit 29f35d6cdf
150 changed files with 1394 additions and 1394 deletions

View File

@@ -33,7 +33,7 @@ complete -c abook -l add-email -d 'Read email message from stdin and add the sen
complete -c abook -l add-email-quiet -d 'Same as --add-email. Without confirmation' complete -c abook -l add-email-quiet -d 'Same as --add-email. Without confirmation'
complete -c abook -l convert -d 'Convert address book files' complete -c abook -l convert -d 'Convert address book files'
set -l convert 'contains -- --convert (commandline -po)' set -l convert 'contains -- --convert (commandline -px)'
complete -c abook -l informat -d 'Input file format' -xa '(__fish_complete_abook_formats in)' -n $convert complete -c abook -l informat -d 'Input file format' -xa '(__fish_complete_abook_formats in)' -n $convert
complete -c abook -l outformat -d 'Output file format' -xa '(__fish_complete_abook_formats out)' -n $convert complete -c abook -l outformat -d 'Output file format' -xa '(__fish_complete_abook_formats out)' -n $convert
complete -c abook -l infile -d 'Input file (default: stdin)' -r -n $convert complete -c abook -l infile -d 'Input file (default: stdin)' -r -n $convert

View File

@@ -1,7 +1,7 @@
# Completions for Android adb command # Completions for Android adb command
function __fish_adb_no_subcommand -d 'Test if adb has yet to be given the subcommand' function __fish_adb_no_subcommand -d 'Test if adb has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i connect disconnect devices push pull sync shell emu logcat install uninstall jdwp forward bugreport backup restore version help start-server kill-server remount reboot get-state get-serialno get-devpath status-window root usb tcpip ppp sideload reconnect unroot exec-out if contains -- $i connect disconnect devices push pull sync shell emu logcat install uninstall jdwp forward bugreport backup restore version help start-server kill-server remount reboot get-state get-serialno get-devpath status-window root usb tcpip ppp sideload reconnect unroot exec-out
return 1 return 1
end end
@@ -25,7 +25,7 @@ end
function __fish_adb_run_command -d 'Runs adb with any -s parameters already given on the command line' function __fish_adb_run_command -d 'Runs adb with any -s parameters already given on the command line'
set -l sopt set -l sopt
set -l sopt_is_next set -l sopt_is_next
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
set -e cmd[1] set -e cmd[1]
for i in $cmd for i in $cmd
if test -n "$sopt_is_next" if test -n "$sopt_is_next"

View File

@@ -2,7 +2,7 @@
function __fish_complete_ant_targets -d "Print list of targets from build.xml and imported files" function __fish_complete_ant_targets -d "Print list of targets from build.xml and imported files"
function __get_buildfile -d "Get a buildfile that will be used by ant" function __get_buildfile -d "Get a buildfile that will be used by ant"
set -l tokens $argv # tokens from 'commandline -opc' set -l tokens $argv # tokens from 'commandline -xpc'
set -l prev $tokens[1] set -l prev $tokens[1]
set -l buildfile "build.xml" set -l buildfile "build.xml"
for token in $argv[2..-1] for token in $argv[2..-1]
@@ -56,7 +56,7 @@ function __fish_complete_ant_targets -d "Print list of targets from build.xml an
end end
# completion for ant targets # completion for ant targets
complete -x -c ant -a "(__fish_complete_ant_targets (commandline -opc))" complete -x -c ant -a "(__fish_complete_ant_targets (commandline -xpc))"
# Script Options: # Script Options:
complete -f -c ant -l help -l h -d 'print help message and ant help' complete -f -c ant -l help -l h -d 'print help message and ant help'

View File

@@ -1,6 +1,6 @@
# Returns exit code of 0 if apm hasn't received a command yet, e.g. `config` # Returns exit code of 0 if apm hasn't received a command yet, e.g. `config`
function __fish_apm_needs_command function __fish_apm_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
else if test (count $cmd) -gt 1 else if test (count $cmd) -gt 1
@@ -21,7 +21,7 @@ end
# Returns exit code of 0 if any command (argv[1..-1]) appears once, ignores flags. # Returns exit code of 0 if any command (argv[1..-1]) appears once, ignores flags.
function __fish_apm_using_command function __fish_apm_using_command
set -l commands $argv set -l commands $argv
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
set -l command_seen_once 1 set -l command_seen_once 1
for c in $cmd[2..-1] for c in $cmd[2..-1]
@@ -50,7 +50,7 @@ end
# Check if `commandline` contains a set of subcommands # Check if `commandline` contains a set of subcommands
function __fish_apm_includes_subcommand function __fish_apm_includes_subcommand
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
for subcommand in $argv for subcommand in $argv
if contains $subcommand $cmd if contains $subcommand $cmd
return 0 return 0

View File

@@ -30,7 +30,7 @@ complete -r -c apt-cache -s c -l config-file -d "Specify config file"
complete -x -c apt-cache -s o -l option -d "Specify options" complete -x -c apt-cache -s o -l option -d "Specify options"
function __fish_apt-cache_use_package -d 'Test if apt command should have packages as potential completion' function __fish_apt-cache_use_package -d 'Test if apt command should have packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i contains show showpkg showsrc depends rdepends dotty policy if contains -- $i contains show showpkg showsrc depends rdepends dotty policy
return 0 return 0
end end

View File

@@ -1,7 +1,7 @@
#completion for apt-get #completion for apt-get
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand' function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove purge source build-dep check clean autoclean changelog if contains -- $i update upgrade dselect-upgrade dist-upgrade install remove purge source build-dep check clean autoclean changelog
return 1 return 1
end end
@@ -10,7 +10,7 @@ function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcom
end end
function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion' function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i contains install remove purge build-dep changelog if contains -- $i contains install remove purge build-dep changelog
return 0 return 0
end end

View File

@@ -1,7 +1,7 @@
#completion for apt-mark #completion for apt-mark
function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand' function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i auto manual hold unhold showauto showmanual showhold if contains -- $i auto manual hold unhold showauto showmanual showhold
return 1 return 1
end end
@@ -10,7 +10,7 @@ function __fish_apt_no_subcommand -d 'Test if apt has yet to be given the subcom
end end
function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion' function __fish_apt_use_package -d 'Test if apt command should have packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i contains auto manual hold unhold if contains -- $i contains auto manual hold unhold
return 0 return 0
end end

View File

@@ -1,7 +1,7 @@
#completion for aptitude #completion for aptitude
function __fish_apt_no_subcommand -d 'Test if aptitude has yet to be given the subcommand' function __fish_apt_no_subcommand -d 'Test if aptitude has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i autoclean clean forget-new keep-all update safe-upgrade changelog full-upgrade download forbid-version hold install keep markauto purge reinstall remove show unhold unmarkauto search help if contains -- $i autoclean clean forget-new keep-all update safe-upgrade changelog full-upgrade download forbid-version hold install keep markauto purge reinstall remove show unhold unmarkauto search help
return 1 return 1
end end
@@ -10,7 +10,7 @@ function __fish_apt_no_subcommand -d 'Test if aptitude has yet to be given the s
end end
function __fish_apt_use_package -d 'Test if aptitude command should have packages as potential completion' function __fish_apt_use_package -d 'Test if aptitude command should have packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i changelog full-upgrade download forbid-version hold install keep-all markauto purge reinstall remove show unhold unmarkauto if contains -- $i changelog full-upgrade download forbid-version hold install keep-all markauto purge reinstall remove show unhold unmarkauto
return 0 return 0
end end

View File

@@ -1,7 +1,7 @@
# fish completion for arc # fish completion for arc
function __fish_arc_needs_command function __fish_arc_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if not set -q cmd[2] if not set -q cmd[2]
return 0 return 0
else else

View File

@@ -1,5 +1,5 @@
function __fish_argparse_exclusive_args --description 'Helper function to list unused options' function __fish_argparse_exclusive_args --description 'Helper function to list unused options'
set --local all_tokens (commandline --tokenize) set --local all_tokens (commandline --expand-tokens)
set --erase all_tokens[1] set --erase all_tokens[1]
set --local current_token (commandline --current-token) set --local current_token (commandline --current-token)

View File

@@ -28,7 +28,7 @@ end
# This accounts for things like `aws --debug s3 foo ... s3://...` # This accounts for things like `aws --debug s3 foo ... s3://...`
function __s3_cmd_in function __s3_cmd_in
set -l is_s3 0 set -l is_s3 0
set -l tokens (commandline -co) set -l tokens (commandline -cx)
for token in $tokens[2..-1] for token in $tokens[2..-1]
# Ignore switches everywhere # Ignore switches everywhere
if string match -qr -- "^--" $token if string match -qr -- "^--" $token

View File

@@ -1,7 +1,7 @@
function __fish_bind_test1 function __fish_bind_test1
set -l args set -l args
set -l use_keys no set -l use_keys no
for i in (commandline -poc) for i in (commandline -pxc)
switch $i switch $i
case -k --k --ke --key case -k --k --ke --key
set use_keys yes set use_keys yes
@@ -25,7 +25,7 @@ end
function __fish_bind_test2 function __fish_bind_test2
set -l args set -l args
for i in (commandline -poc) for i in (commandline -pxc)
switch $i switch $i
case "-*" case "-*"

View File

@@ -6,7 +6,7 @@ function __blender_echo_input_file_name
# Find last argument ending in .blend (or .blend1, etc.) # Find last argument ending in .blend (or .blend1, etc.)
# This is because a Blender invocation can open multiple blend file # This is because a Blender invocation can open multiple blend file
# sequentially, so we need to find the last one up to this point. # sequentially, so we need to find the last one up to this point.
set -l path (commandline -poc | set -l path (commandline -pxc |
string match -r '.*\\.blend[0-9]*$' | string match -r '.*\\.blend[0-9]*$' |
tail --lines=1) tail --lines=1)
echo $path echo $path

View File

@@ -1,5 +1,5 @@
complete -c builtin -n 'test (count (commandline -opc)) -eq 1' -s h -l help -d 'Display help and exit' complete -c builtin -n 'test (count (commandline -xpc)) -eq 1' -s h -l help -d 'Display help and exit'
complete -c builtin -n 'test (count (commandline -opc)) -eq 1' -s n -l names -d 'Print names of all existing builtins' complete -c builtin -n 'test (count (commandline -xpc)) -eq 1' -s n -l names -d 'Print names of all existing builtins'
complete -c builtin -n 'test (count (commandline -opc)) -eq 1' -s q -l query -d 'Tests if builtin exists' complete -c builtin -n 'test (count (commandline -xpc)) -eq 1' -s q -l query -d 'Tests if builtin exists'
complete -c builtin -n 'test (count (commandline -opc)) -eq 1' -xa '(builtin -n)' complete -c builtin -n 'test (count (commandline -xpc)) -eq 1' -xa '(builtin -n)'
complete -c builtin -n 'test (count (commandline -opc)) -ge 2' -xa '(__fish_complete_subcommand)' complete -c builtin -n 'test (count (commandline -xpc)) -ge 2' -xa '(__fish_complete_subcommand)'

View File

@@ -1,7 +1,7 @@
# Completion for bundler # Completion for bundler
function __fish_bundle_no_command -d 'Test if bundle has been given no subcommand' function __fish_bundle_no_command -d 'Test if bundle has been given no subcommand'
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end
@@ -9,7 +9,7 @@ function __fish_bundle_no_command -d 'Test if bundle has been given no subcomman
end end
function __fish_bundle_using_command -d 'Test if bundle has been given a specific subcommand' function __fish_bundle_using_command -d 'Test if bundle has been given a specific subcommand'
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -23,7 +23,7 @@ function _fish_busctl
m-match= S-size= l-list q-quiet v-verbose e-expect-reply= Ä-auto-start= \ m-match= S-size= l-list q-quiet v-verbose e-expect-reply= Ä-auto-start= \
1-allow-interactive-authorization= t-timeout= 2-augment-creds= U-user 3-system \ 1-allow-interactive-authorization= t-timeout= 2-augment-creds= U-user 3-system \
H/host= M/machine= n-no-pager N-no-legend h/help V-version H/host= M/machine= n-no-pager N-no-legend h/help V-version
set -l cmdline (commandline -opc) (commandline -ct) set -l cmdline (commandline -xpc) (commandline -ct)
set -e cmdline[1] set -e cmdline[1]
argparse $args -- $cmdline 2>/dev/null argparse $args -- $cmdline 2>/dev/null
or return or return

View File

@@ -1,5 +1,5 @@
function __fish_complete_cabal function __fish_complete_cabal
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
cabal $cmd[2..-1] --list-options cabal $cmd[2..-1] --list-options
else else

View File

@@ -1,6 +1,6 @@
function __fish_canto_using_command function __fish_canto_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -1,5 +1,5 @@
function __cleanmgr_complete_args -d 'Function to generate args' function __cleanmgr_complete_args -d 'Function to generate args'
set -l previous_token (commandline -oc)[-1] set -l previous_token (commandline -xc)[-1]
if test "$previous_token" = /d if test "$previous_token" = /d
__fish_print_windows_drives __fish_print_windows_drives

View File

@@ -3,7 +3,7 @@
# The tool can be found at https://github.com/adtac/climate # The tool can be found at https://github.com/adtac/climate
function __fish_climate_has_no_argument function __fish_climate_has_no_argument
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
not set -q cmd[2] not set -q cmd[2]
end end

View File

@@ -1,6 +1,6 @@
function __cmdkey_complete_args -d 'Function to generate args' function __cmdkey_complete_args -d 'Function to generate args'
set -l current_token (commandline -tc) set -l current_token (commandline -tc)
set -l previous_token (commandline -oc)[-1] set -l previous_token (commandline -xc)[-1]
switch $current_token switch $current_token
case '/user:*' case '/user:*'

View File

@@ -1,5 +1,5 @@
complete -c command -n 'test (count (commandline -opc)) -eq 1' -s h -l help -d 'Display help and exit' complete -c command -n 'test (count (commandline -xpc)) -eq 1' -s h -l help -d 'Display help and exit'
complete -c command -n 'test (count (commandline -opc)) -eq 1' -s a -l all -d 'Print all external commands by the given name' complete -c command -n 'test (count (commandline -xpc)) -eq 1' -s a -l all -d 'Print all external commands by the given name'
complete -c command -n 'test (count (commandline -opc)) -eq 1' -s q -l quiet -l query -d 'Do not print anything, only set exit status' complete -c command -n 'test (count (commandline -xpc)) -eq 1' -s q -l quiet -l query -d 'Do not print anything, only set exit status'
complete -c command -n 'test (count (commandline -opc)) -eq 1' -s s -s v -l search -d 'Print the file that would be executed' complete -c command -n 'test (count (commandline -xpc)) -eq 1' -s s -s v -l search -d 'Print the file that would be executed'
complete -c command -xa "(__fish_complete_subcommand)" complete -c command -xa "(__fish_complete_subcommand)"

View File

@@ -1,5 +1,5 @@
function __fish_composer_needs_command function __fish_composer_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
@@ -9,7 +9,7 @@ function __fish_composer_needs_command
end end
function __fish_composer_using_command function __fish_composer_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]

View File

@@ -27,7 +27,7 @@ function __fish_conda_subcommand
set -l have_sub $status set -l have_sub $status
# get the commandline args without the "conda" # get the commandline args without the "conda"
set -l toks (commandline -opc)[2..-1] set -l toks (commandline -xpc)[2..-1]
# Remove any important options - if we had options with arguments, # Remove any important options - if we had options with arguments,
# they'd need to be listed here to be removed. # they'd need to be listed here to be removed.

View File

@@ -85,7 +85,7 @@ complete -c configure -l host -d "Cross-compile to build programs to run on HOST
complete -c configure -l target -d "Configure for building compilers for TARGET" -x complete -c configure -l target -d "Configure for building compilers for TARGET" -x
# use autoconf's --help to generate completions: # use autoconf's --help to generate completions:
complete -c configure -a '(for tok in (commandline -opc) complete -c configure -a '(for tok in (commandline -xpc)
if string match -q "*configure" -- $tok if string match -q "*configure" -- $tok
__fish_parse_configure $tok __fish_parse_configure $tok
break break

View File

@@ -19,31 +19,31 @@ function __fish_print_connman_vpnconnections
end end
# connmanctl does not accept options before commands, so requiring the commands to be in second position is okay # connmanctl does not accept options before commands, so requiring the commands to be in second position is okay
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a state -d "Shows if the system is online or offline" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a state -d "Shows if the system is online or offline"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a technologies -d "Display technologies" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a technologies -d "Display technologies"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a clock -d "Get System Clock Properties" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a clock -d "Get System Clock Properties"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a enable -d "Enables given technology or offline mode" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a enable -d "Enables given technology or offline mode"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] enable" -a "(__fish_print_connman_technologies) offline" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] enable" -a "(__fish_print_connman_technologies) offline"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a disable -d "Disables given technology or offline mode" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a disable -d "Disables given technology or offline mode"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] disable" -a "(__fish_print_connman_technologies) offline" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] disable" -a "(__fish_print_connman_technologies) offline"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a tether -d "Enable, disable tethering, set SSID and passphrase for wifi" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a tether -d "Enable, disable tethering, set SSID and passphrase for wifi"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] tether" -a "(__fish_print_connman_technologies)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] tether" -a "(__fish_print_connman_technologies)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 3; and contains -- (commandline -opc)[2] tether" -a "on off" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 3; and contains -- (commandline -xpc)[2] tether" -a "on off"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a services -d "Display services" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a services -d "Display services"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] services" -a "(__fish_print_connman_services)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] services" -a "(__fish_print_connman_services)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a peers -d "Display peers" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a peers -d "Display peers"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a scan -d "Scans for new services for given technology" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a scan -d "Scans for new services for given technology"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] scan" -a "(__fish_print_connman_technologies)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] scan" -a "(__fish_print_connman_technologies)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a connect -d "Connect a given service or peer" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a connect -d "Connect a given service or peer"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] connect" -a "(__fish_print_connman_services)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] connect" -a "(__fish_print_connman_services)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a disconnect -d "Disconnect a given service or peer" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a disconnect -d "Disconnect a given service or peer"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] disconnect" -a "(__fish_print_connman_services)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] disconnect" -a "(__fish_print_connman_services)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a config -d "Set service configuration options" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a config -d "Set service configuration options"
complete -f -c connmanctl -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] config" -a "(__fish_print_connman_services)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] config" -a "(__fish_print_connman_services)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a monitor -d "Monitor signals from interfaces" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a monitor -d "Monitor signals from interfaces"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a vpnconnections -d "Display VPN connections" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a vpnconnections -d "Display VPN connections"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] vpnconnections" -a "(__fish_print_connman_vpnconnections)" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] vpnconnections" -a "(__fish_print_connman_vpnconnections)"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a session -d "Enable or disable a session" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a session -d "Enable or disable a session"
complete -f -c connmanctl -n "test (count (commandline -opc)) -eq 2; and contains -- (commandline -opc)[2] session" -a "on off connect disconnect config" complete -f -c connmanctl -n "test (count (commandline -xpc)) -eq 2; and contains -- (commandline -xpc)[2] session" -a "on off connect disconnect config"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a peer_service -d "(Un)Register a Peer Service" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a peer_service -d "(Un)Register a Peer Service"
complete -f -c connmanctl -n "test (count (commandline -opc)) -lt 2" -a help -d "Show help" complete -f -c connmanctl -n "test (count (commandline -xpc)) -lt 2" -a help -d "Show help"

View File

@@ -77,195 +77,195 @@ complete -c cvs -n __fish_use_subcommand -x -a watchers -d 'See who is watching
# Completions for the 'add' subcommand # Completions for the 'add' subcommand
# #
complete -c cvs -n 'contains \'add\' (commandline -poc)' -s k -x -d 'Use "rcs-kflag" to add the file with the specified' complete -c cvs -n 'contains \'add\' (commandline -pxc)' -s k -x -d 'Use "rcs-kflag" to add the file with the specified'
complete -c cvs -n 'contains \'add\' (commandline -poc)' -s m -x -d 'Use "message" for the creation log.' complete -c cvs -n 'contains \'add\' (commandline -pxc)' -s m -x -d 'Use "message" for the creation log.'
# #
# Completions for the 'admin' subcommand # Completions for the 'admin' subcommand
# #
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s a -x -d 'Append (comma-separated) user names to access list.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s a -x -d 'Append (comma-separated) user names to access list.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s A -x -d 'Append another file\'s access list.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s A -x -d 'Append another file\'s access list.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s b -d '[rev] Set default branch (highest branch on trunk if omitted).' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s b -d '[rev] Set default branch (highest branch on trunk if omitted).'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s c -x -d 'Set comment leader.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s c -x -d 'Set comment leader.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s e -d '[users] Remove (comma-separated) user names from access list' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s e -d '[users] Remove (comma-separated) user names from access list'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s I -d 'Run interactively.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s I -d 'Run interactively.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s k -x -d 'Set keyword substitution mode:' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s k -x -d 'Set keyword substitution mode:'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s l -d '[rev] Lock revision (latest revision on branch,' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s l -d '[rev] Lock revision (latest revision on branch,'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s L -d 'Set strict locking.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s L -d 'Set strict locking.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s m -x -d 'Replace revision\'s log message.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s m -x -d 'Replace revision\'s log message.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s n -x -d 'Tag branch or revision. If :rev is omitted,' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s n -x -d 'Tag branch or revision. If :rev is omitted,'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s N -x -d 'Same as -n except override existing tag.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s N -x -d 'Same as -n except override existing tag.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s o -x -d 'Delete (outdate) specified range of revisions:' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s o -x -d 'Delete (outdate) specified range of revisions:'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s q -d 'Run quietly.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s q -d 'Run quietly.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s s -x -d 'Set revision state (latest revision on branch,' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s s -x -d 'Set revision state (latest revision on branch,'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s t -d '[file] Get descriptive text from file (stdin if omitted).' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s t -d '[file] Get descriptive text from file (stdin if omitted).'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s t -d '-string Set descriptive text.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s t -d '-string Set descriptive text.'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s u -d '[rev] Unlock the revision (latest revision on branch,' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s u -d '[rev] Unlock the revision (latest revision on branch,'
complete -c cvs -n 'contains \'admin\' (commandline -poc)' -s U -d 'Unset strict locking.' complete -c cvs -n 'contains \'admin\' (commandline -pxc)' -s U -d 'Unset strict locking.'
# #
# Completions for the 'annotate' subcommand # Completions for the 'annotate' subcommand
# #
complete -c cvs -n 'contains \'annotate\' (commandline -poc)' -s l -d 'Local directory only, no recursion.' complete -c cvs -n 'contains \'annotate\' (commandline -pxc)' -s l -d 'Local directory only, no recursion.'
complete -c cvs -n 'contains \'annotate\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'annotate\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'annotate\' (commandline -poc)' -s f -d 'Use head revision if tag/date not found.' complete -c cvs -n 'contains \'annotate\' (commandline -pxc)' -s f -d 'Use head revision if tag/date not found.'
complete -c cvs -n 'contains \'annotate\' (commandline -poc)' -s F -d 'Annotate binary files.' complete -c cvs -n 'contains \'annotate\' (commandline -pxc)' -s F -d 'Annotate binary files.'
complete -c cvs -n 'contains \'annotate\' (commandline -poc)' -s r -x -d 'Annotate file as of specified revision/tag.' complete -c cvs -n 'contains \'annotate\' (commandline -pxc)' -s r -x -d 'Annotate file as of specified revision/tag.'
complete -c cvs -n 'contains \'annotate\' (commandline -poc)' -s D -x -d 'Annotate file as of specified date.' complete -c cvs -n 'contains \'annotate\' (commandline -pxc)' -s D -x -d 'Annotate file as of specified date.'
# #
# Completions for the 'checkout' subcommand # Completions for the 'checkout' subcommand
# #
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s A -d 'Reset any sticky tags/date/kopts.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s A -d 'Reset any sticky tags/date/kopts.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s N -d 'Don\'t shorten module paths if -d specified.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s N -d 'Don\'t shorten module paths if -d specified.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s P -d 'Prune empty directories.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s P -d 'Prune empty directories.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s c -d '"cat" the module database.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s c -d '"cat" the module database.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s f -d 'Force a head revision match if tag/date not found.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s f -d 'Force a head revision match if tag/date not found.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s l -d 'Local directory only, not recursive' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s l -d 'Local directory only, not recursive'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s n -d 'Do not run module program (if any).' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s n -d 'Do not run module program (if any).'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s p -d 'Check out files to standard output (avoids stickiness).' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s p -d 'Check out files to standard output (avoids stickiness).'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s s -d 'Like -c, but include module status.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s s -d 'Like -c, but include module status.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s r -x -d 'Check out revision or tag. (implies -P) (is sticky)' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s r -x -d 'Check out revision or tag. (implies -P) (is sticky)'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s D -x -d 'Check out revisions as of date. (implies -P) (is sticky)' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s D -x -d 'Check out revisions as of date. (implies -P) (is sticky)'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s d -x -a '(__fish_complete_directories (commandline -ct))' -d 'Check out into dir instead of module name.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s d -x -a '(__fish_complete_directories (commandline -ct))' -d 'Check out into dir instead of module name.'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s k -x -d 'Use RCS kopt -k option on checkout. (is sticky)' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s k -x -d 'Use RCS kopt -k option on checkout. (is sticky)'
complete -c cvs -n 'contains \'checkout\' (commandline -poc)' -s j -x -d 'Merge in changes made between current revision and rev.' complete -c cvs -n 'contains \'checkout\' (commandline -pxc)' -s j -x -d 'Merge in changes made between current revision and rev.'
# #
# Completions for the 'commit' subcommand # Completions for the 'commit' subcommand
# #
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s c -d 'Check for valid edits before committing.' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s c -d 'Check for valid edits before committing.'
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s l -d 'Local directory only (not recursive).' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s l -d 'Local directory only (not recursive).'
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s f -d 'Force the file to be committed; disables recursion.' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s f -d 'Force the file to be committed; disables recursion.'
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s F -x -d 'Read the log message from file.' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s F -x -d 'Read the log message from file.'
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s m -x -d 'Log message.' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s m -x -d 'Log message.'
complete -c cvs -n 'contains \'commit\' (commandline -poc)' -s r -x -d 'Commit to this branch or trunk revision.' complete -c cvs -n 'contains \'commit\' (commandline -pxc)' -s r -x -d 'Commit to this branch or trunk revision.'
# #
# Completions for the 'diff' subcommand # Completions for the 'diff' subcommand
# #
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s l -d 'Local directory only, not recursive' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s l -d 'Local directory only, not recursive'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s k -x -d 'Specify keyword expansion mode.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s k -x -d 'Specify keyword expansion mode.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s D -x -d 'Diff revision for date against working file.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s D -x -d 'Diff revision for date against working file.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s D -x -d 'Diff rev1/date1 against date2.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s D -x -d 'Diff rev1/date1 against date2.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s r -x -d 'Diff revision for rev1 against working file.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s r -x -d 'Diff revision for rev1 against working file.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s r -x -d 'Diff rev1/date1 against rev2.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s r -x -d 'Diff rev1/date1 against rev2.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s i -d '--ignore-case Consider upper- and lower-case to be the same.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s i -d '--ignore-case Consider upper- and lower-case to be the same.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s w -d '--ignore-all-space Ignore all white space.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s w -d '--ignore-all-space Ignore all white space.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s b -d '--ignore-space-change Ignore changes in the amount of white space.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s b -d '--ignore-space-change Ignore changes in the amount of white space.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s B -d '--ignore-blank-lines Ignore changes whose lines are all blank.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s B -d '--ignore-blank-lines Ignore changes whose lines are all blank.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s I -x -d '--ignore-matching-lines=RE Ignore changes whose lines all match RE.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s I -x -d '--ignore-matching-lines=RE Ignore changes whose lines all match RE.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Binary Read and write data in binary mode.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Binary Read and write data in binary mode.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s a -d '--text Treat all files as text.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s a -d '--text Treat all files as text.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s c -d '-C NUM --context[=NUM] Output NUM (default 2) lines of copied context.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s c -d '-C NUM --context[=NUM] Output NUM (default 2) lines of copied context.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s u -d '-U NUM --unified[=NUM] Output NUM (default 2) lines of unified context.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s u -d '-U NUM --unified[=NUM] Output NUM (default 2) lines of unified context.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s N -d 'UM Use NUM context lines.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s N -d 'UM Use NUM context lines.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s L -x -d '--label LABEL Use LABEL instead of file name.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s L -x -d '--label LABEL Use LABEL instead of file name.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s p -d '--show-c-function Show which C function each change is in.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s p -d '--show-c-function Show which C function each change is in.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s F -x -d '--show-function-line=RE Show the most recent line matching RE.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s F -x -d '--show-function-line=RE Show the most recent line matching RE.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Brief Output only whether files differ.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Brief Output only whether files differ.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s e -d '--ed Output an ed script.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s e -d '--ed Output an ed script.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s f -d '--forward-ed Output something like an ed script in forward order.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s f -d '--forward-ed Output something like an ed script in forward order.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s n -d '--rcs Output an RCS format diff.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s n -d '--rcs Output an RCS format diff.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s y -d '--side-by-side Output in two columns.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s y -d '--side-by-side Output in two columns.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s W -x -d '--width=NUM Output at most NUM (default 130) characters per line.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s W -x -d '--width=NUM Output at most NUM (default 130) characters per line.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Left-column Output only the left column of common lines.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Left-column Output only the left column of common lines.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Suppress-common-lines Do not output common lines.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Suppress-common-lines Do not output common lines.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Ifdef=NAME Output merged file to show `#ifdef NAME\' diffs.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Ifdef=NAME Output merged file to show `#ifdef NAME\' diffs.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'GTYPE-group-format=GFMT Similar, but format GTYPE input groups with GFMT.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'GTYPE-group-format=GFMT Similar, but format GTYPE input groups with GFMT.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Line-format=LFMT Similar, but format all input lines with LFMT.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Line-format=LFMT Similar, but format all input lines with LFMT.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'LTYPE-line-format=LFMT Similar, but format LTYPE input lines with LFMT.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'LTYPE-line-format=LFMT Similar, but format LTYPE input lines with LFMT.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s t -d '--expand-tabs Expand tabs to spaces in output.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s t -d '--expand-tabs Expand tabs to spaces in output.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s T -d '--initial-tab Make tabs line up by prepending a tab.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s T -d '--initial-tab Make tabs line up by prepending a tab.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s N -d '--new-file Treat absent files as empty.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s N -d '--new-file Treat absent files as empty.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s s -d '--report-identical-files Report when two files are the same.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s s -d '--report-identical-files Report when two files are the same.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s - -d 'Horizon-lines=NUM Keep NUM lines of the common prefix and suffix.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s - -d 'Horizon-lines=NUM Keep NUM lines of the common prefix and suffix.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s d -d '--minimal Try hard to find a smaller set of changes.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s d -d '--minimal Try hard to find a smaller set of changes.'
complete -c cvs -n 'contains \'diff\' (commandline -poc)' -s H -d '--speed-large-files Assume large files and many scattered small changes.' complete -c cvs -n 'contains \'diff\' (commandline -pxc)' -s H -d '--speed-large-files Assume large files and many scattered small changes.'
# #
# Completions for the 'edit' subcommand # Completions for the 'edit' subcommand
# #
complete -c cvs -n 'contains \'edit\' (commandline -poc)' -s l -d 'Local directory only, not recursive.' complete -c cvs -n 'contains \'edit\' (commandline -pxc)' -s l -d 'Local directory only, not recursive.'
complete -c cvs -n 'contains \'edit\' (commandline -poc)' -s R -d 'Process directories recursively (default).' complete -c cvs -n 'contains \'edit\' (commandline -pxc)' -s R -d 'Process directories recursively (default).'
complete -c cvs -n 'contains \'edit\' (commandline -poc)' -s a -d 'Specify action to register for temporary watch, one of:' complete -c cvs -n 'contains \'edit\' (commandline -pxc)' -s a -d 'Specify action to register for temporary watch, one of:'
complete -c cvs -n 'contains \'edit\' (commandline -poc)' -s c -d 'Check for <file>s edited by others and abort if found.' complete -c cvs -n 'contains \'edit\' (commandline -pxc)' -s c -d 'Check for <file>s edited by others and abort if found.'
complete -c cvs -n 'contains \'edit\' (commandline -poc)' -s f -d 'Allow edit if <file>s are edited by others (default).' complete -c cvs -n 'contains \'edit\' (commandline -pxc)' -s f -d 'Allow edit if <file>s are edited by others (default).'
# #
# Completions for the 'editors' subcommand # Completions for the 'editors' subcommand
# #
complete -c cvs -n 'contains \'editors\' (commandline -poc)' -s l -d 'Process this directory only (not recursive).' complete -c cvs -n 'contains \'editors\' (commandline -pxc)' -s l -d 'Process this directory only (not recursive).'
complete -c cvs -n 'contains \'editors\' (commandline -poc)' -s R -d 'Process directories recursively (default).' complete -c cvs -n 'contains \'editors\' (commandline -pxc)' -s R -d 'Process directories recursively (default).'
# #
# Completions for the 'export' subcommand # Completions for the 'export' subcommand
# #
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s N -d 'Don\'t shorten module paths if -d specified.' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s N -d 'Don\'t shorten module paths if -d specified.'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s f -d 'Force a head revision match if tag/date not found.' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s f -d 'Force a head revision match if tag/date not found.'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s l -d 'Local directory only, not recursive' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s l -d 'Local directory only, not recursive'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s R -d 'Process directories recursively (default).' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s R -d 'Process directories recursively (default).'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s n -d 'Do not run module program (if any).' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s n -d 'Do not run module program (if any).'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s r -x -d 'Export tagged revisions.' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s r -x -d 'Export tagged revisions.'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s D -x -d 'Export revisions as of date.' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s D -x -d 'Export revisions as of date.'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s d -x -a '(__fish_complete_directories (commandline -ct))' -d 'Export into dir instead of module name.' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s d -x -a '(__fish_complete_directories (commandline -ct))' -d 'Export into dir instead of module name.'
complete -c cvs -n 'contains \'export\' (commandline -poc)' -s k -x -d 'Use RCS kopt -k option on checkout.' complete -c cvs -n 'contains \'export\' (commandline -pxc)' -s k -x -d 'Use RCS kopt -k option on checkout.'
# #
# Completions for the 'history' subcommand # Completions for the 'history' subcommand
# #
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s T -d 'Produce report on all TAGs' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s T -d 'Produce report on all TAGs'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s c -d 'Committed (Modified) files' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s c -d 'Committed (Modified) files'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s o -d 'Checked out modules' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s o -d 'Checked out modules'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s m -x -d 'Look for specified module (repeatable)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s m -x -d 'Look for specified module (repeatable)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s x -x -d 'Extract by record type' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s x -x -d 'Extract by record type'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s e -d 'Everything (same as -x, but all record types)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s e -d 'Everything (same as -x, but all record types)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s a -d 'All users (Default is self)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s a -d 'All users (Default is self)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s l -d 'Last modified (committed or modified report)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s l -d 'Last modified (committed or modified report)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s w -d 'Working directory must match' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s w -d 'Working directory must match'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s D -x -d 'Since date (Many formats)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s D -x -d 'Since date (Many formats)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s b -x -d 'Back to record with str in module/file/repos field' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s b -x -d 'Back to record with str in module/file/repos field'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s f -r -d 'Specified file (same as command line) (repeatable)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s f -r -d 'Specified file (same as command line) (repeatable)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s n -x -d 'In module (repeatable)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s n -x -d 'In module (repeatable)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s p -x -d 'In repository (repeatable)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s p -x -d 'In repository (repeatable)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s r -x -d 'Since rev or tag (looks inside RCS files!)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s r -x -d 'Since rev or tag (looks inside RCS files!)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s t -x -d 'Since tag record placed in history file (by anyone).' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s t -x -d 'Since tag record placed in history file (by anyone).'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s u -x -a '(__fish_complete_users)' -d 'For user name (repeatable)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s u -x -a '(__fish_complete_users)' -d 'For user name (repeatable)'
complete -c cvs -n 'contains \'history\' (commandline -poc)' -s z -x -d 'Output for time zone <tz> (e.g. -z -0700)' complete -c cvs -n 'contains \'history\' (commandline -pxc)' -s z -x -d 'Output for time zone <tz> (e.g. -z -0700)'
# #
# Completions for the 'import' subcommand # Completions for the 'import' subcommand
# #
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s d -d 'Use the file\'s modification time as the time of import.' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s d -d 'Use the file\'s modification time as the time of import.'
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s X -d 'When importing new files, mark their trunk revisions as dead.' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s X -d 'When importing new files, mark their trunk revisions as dead.'
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s k -x -d 'Set default RCS keyword substitution mode.' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s k -x -d 'Set default RCS keyword substitution mode.'
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s I -x -d 'More files to ignore (! to reset).' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s I -x -d 'More files to ignore (! to reset).'
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s b -x -d 'Vendor branch id.' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s b -x -d 'Vendor branch id.'
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s m -x -d 'Log message.' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s m -x -d 'Log message.'
complete -c cvs -n 'contains \'import\' (commandline -poc)' -s W -x -d 'Wrappers specification line.' complete -c cvs -n 'contains \'import\' (commandline -pxc)' -s W -x -d 'Wrappers specification line.'
# #
@@ -284,19 +284,19 @@ complete -c cvs -n 'contains \'import\' (commandline -poc)' -s W -x -d 'Wrappers
# Completions for the 'log' subcommand # Completions for the 'log' subcommand
# #
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s l -d 'Local directory only, no recursion.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s l -d 'Local directory only, no recursion.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s b -d 'Only list revisions on the default branch.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s b -d 'Only list revisions on the default branch.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s h -d 'Only print header.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s h -d 'Only print header.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s R -d 'Only print name of RCS file.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s R -d 'Only print name of RCS file.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s t -d 'Only print header and descriptive text.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s t -d 'Only print header and descriptive text.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s N -d 'Do not list tags.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s N -d 'Do not list tags.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s S -d 'Do not print name/header if no revisions selected. -d, -r,' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s S -d 'Do not print name/header if no revisions selected. -d, -r,'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s s -d ', & -w have little effect in conjunction with -b, -h, -R, and' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s s -d ', & -w have little effect in conjunction with -b, -h, -R, and'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s t -x -d 'This option.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s t -x -d 'This option.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s r -d '[revisions]' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s r -d '[revisions]'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s d -x -d 'A semicolon-separated list of dates' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s d -x -d 'A semicolon-separated list of dates'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s s -x -d 'Only list revisions with specified states.' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s s -x -d 'Only list revisions with specified states.'
complete -c cvs -n 'contains \'log\' (commandline -poc)' -s w -d '[logins]' complete -c cvs -n 'contains \'log\' (commandline -pxc)' -s w -d '[logins]'
# #
@@ -315,175 +315,175 @@ complete -c cvs -n 'contains \'log\' (commandline -poc)' -s w -d '[logins]'
# Completions for the 'ls' subcommand # Completions for the 'ls' subcommand
# #
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s d -d 'Show dead revisions (with tag when specified).' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s d -d 'Show dead revisions (with tag when specified).'
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s e -d 'Display in CVS/Entries format.' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s e -d 'Display in CVS/Entries format.'
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s l -d 'Display all details.' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s l -d 'Display all details.'
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s P -d 'Prune empty directories.' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s P -d 'Prune empty directories.'
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s R -d 'List recursively.' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s R -d 'List recursively.'
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s r -x -d 'Show files with revision or tag.' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s r -x -d 'Show files with revision or tag.'
complete -c cvs -n 'contains \'ls\' (commandline -poc)' -s D -x -d 'Show files from date.' complete -c cvs -n 'contains \'ls\' (commandline -pxc)' -s D -x -d 'Show files from date.'
# #
# Completions for the 'pserver' subcommand # Completions for the 'pserver' subcommand
# #
complete -c cvs -n 'contains \'pserver\' (commandline -poc)' -s c -x -d 'Path to an alternative CVS config file.' complete -c cvs -n 'contains \'pserver\' (commandline -pxc)' -s c -x -d 'Path to an alternative CVS config file.'
# #
# Completions for the 'rannotate' subcommand # Completions for the 'rannotate' subcommand
# #
complete -c cvs -n 'contains \'rannotate\' (commandline -poc)' -s l -d 'Local directory only, no recursion.' complete -c cvs -n 'contains \'rannotate\' (commandline -pxc)' -s l -d 'Local directory only, no recursion.'
complete -c cvs -n 'contains \'rannotate\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'rannotate\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'rannotate\' (commandline -poc)' -s f -d 'Use head revision if tag/date not found.' complete -c cvs -n 'contains \'rannotate\' (commandline -pxc)' -s f -d 'Use head revision if tag/date not found.'
complete -c cvs -n 'contains \'rannotate\' (commandline -poc)' -s F -d 'Annotate binary files.' complete -c cvs -n 'contains \'rannotate\' (commandline -pxc)' -s F -d 'Annotate binary files.'
complete -c cvs -n 'contains \'rannotate\' (commandline -poc)' -s r -x -d 'Annotate file as of specified revision/tag.' complete -c cvs -n 'contains \'rannotate\' (commandline -pxc)' -s r -x -d 'Annotate file as of specified revision/tag.'
complete -c cvs -n 'contains \'rannotate\' (commandline -poc)' -s D -x -d 'Annotate file as of specified date.' complete -c cvs -n 'contains \'rannotate\' (commandline -pxc)' -s D -x -d 'Annotate file as of specified date.'
# #
# Completions for the 'rdiff' subcommand # Completions for the 'rdiff' subcommand
# #
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s r -x -d 'Date [-r rev2 | -D date2] modules…' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s r -x -d 'Date [-r rev2 | -D date2] modules…'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s f -d 'Force a head revision match if tag/date not found.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s f -d 'Force a head revision match if tag/date not found.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s l -d 'Local directory only, not recursive' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s l -d 'Local directory only, not recursive'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s c -d 'Context diffs (default)' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s c -d 'Context diffs (default)'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s u -d 'Unidiff format.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s u -d 'Unidiff format.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s s -d 'Short patch - one liner per file.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s s -d 'Short patch - one liner per file.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s t -d 'Top two diffs - last change made to the file.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s t -d 'Top two diffs - last change made to the file.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s V -x -d 'Use RCS Version "vers" for keyword expansion.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s V -x -d 'Use RCS Version "vers" for keyword expansion.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s k -x -d 'Specify keyword expansion mode.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s k -x -d 'Specify keyword expansion mode.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s D -x -d 'Date.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s D -x -d 'Date.'
complete -c cvs -n 'contains \'rdiff\' (commandline -poc)' -s r -x -d 'Revision - symbolic or numeric.' complete -c cvs -n 'contains \'rdiff\' (commandline -pxc)' -s r -x -d 'Revision - symbolic or numeric.'
# #
# Completions for the 'release' subcommand # Completions for the 'release' subcommand
# #
complete -c cvs -n 'contains \'release\' (commandline -poc)' -s d -d 'Delete the given directory.' complete -c cvs -n 'contains \'release\' (commandline -pxc)' -s d -d 'Delete the given directory.'
# #
# Completions for the 'remove' subcommand # Completions for the 'remove' subcommand
# #
complete -c cvs -n 'contains \'remove\' (commandline -poc)' -s f -d 'Delete the file before removing it.' complete -c cvs -n 'contains \'remove\' (commandline -pxc)' -s f -d 'Delete the file before removing it.'
complete -c cvs -n 'contains \'remove\' (commandline -poc)' -s l -d 'Process this directory only (not recursive).' complete -c cvs -n 'contains \'remove\' (commandline -pxc)' -s l -d 'Process this directory only (not recursive).'
complete -c cvs -n 'contains \'remove\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'remove\' (commandline -pxc)' -s R -d 'Process directories recursively.'
# #
# Completions for the 'rlog' subcommand # Completions for the 'rlog' subcommand
# #
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s l -d 'Local directory only, no recursion.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s l -d 'Local directory only, no recursion.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s b -d 'Only list revisions on the default branch.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s b -d 'Only list revisions on the default branch.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s h -d 'Only print header.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s h -d 'Only print header.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s R -d 'Only print name of RCS file.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s R -d 'Only print name of RCS file.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s t -d 'Only print header and descriptive text.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s t -d 'Only print header and descriptive text.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s N -d 'Do not list tags.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s N -d 'Do not list tags.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s S -d 'Do not print name/header if no revisions selected. -d, -r,' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s S -d 'Do not print name/header if no revisions selected. -d, -r,'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s s -d ', & -w have little effect in conjunction with -b, -h, -R, and' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s s -d ', & -w have little effect in conjunction with -b, -h, -R, and'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s t -x -d 'This option.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s t -x -d 'This option.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s r -d '[revisions]' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s r -d '[revisions]'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s d -x -d 'A semicolon-separated list of dates' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s d -x -d 'A semicolon-separated list of dates'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s s -x -d 'Only list revisions with specified states.' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s s -x -d 'Only list revisions with specified states.'
complete -c cvs -n 'contains \'rlog\' (commandline -poc)' -s w -d '[logins]' complete -c cvs -n 'contains \'rlog\' (commandline -pxc)' -s w -d '[logins]'
# #
# Completions for the 'rls' subcommand # Completions for the 'rls' subcommand
# #
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s d -d 'Show dead revisions (with tag when specified).' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s d -d 'Show dead revisions (with tag when specified).'
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s e -d 'Display in CVS/Entries format.' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s e -d 'Display in CVS/Entries format.'
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s l -d 'Display all details.' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s l -d 'Display all details.'
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s P -d 'Prune empty directories.' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s P -d 'Prune empty directories.'
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s R -d 'List recursively.' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s R -d 'List recursively.'
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s r -x -d 'Show files with revision or tag.' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s r -x -d 'Show files with revision or tag.'
complete -c cvs -n 'contains \'rls\' (commandline -poc)' -s D -x -d 'Show files from date.' complete -c cvs -n 'contains \'rls\' (commandline -pxc)' -s D -x -d 'Show files from date.'
# #
# Completions for the 'rtag' subcommand # Completions for the 'rtag' subcommand
# #
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s a -d 'Clear tag from removed files that would not otherwise be tagged.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s a -d 'Clear tag from removed files that would not otherwise be tagged.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s b -d 'Make the tag a "branch" tag, allowing concurrent development.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s b -d 'Make the tag a "branch" tag, allowing concurrent development.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s B -d 'Allows -F and -d to disturb branch tags. Use with extreme care.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s B -d 'Allows -F and -d to disturb branch tags. Use with extreme care.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s d -d 'Delete the given tag.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s d -d 'Delete the given tag.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s F -d 'Move tag if it already exists.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s F -d 'Move tag if it already exists.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s f -d 'Force a head revision match if tag/date not found.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s f -d 'Force a head revision match if tag/date not found.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s l -d 'Local directory only, not recursive.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s l -d 'Local directory only, not recursive.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s n -d 'No execution of \'tag program\'.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s n -d 'No execution of \'tag program\'.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s r -x -d 'Existing revision/tag.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s r -x -d 'Existing revision/tag.'
complete -c cvs -n 'contains \'rtag\' (commandline -poc)' -s D -d 'Existing date.' complete -c cvs -n 'contains \'rtag\' (commandline -pxc)' -s D -d 'Existing date.'
# #
# Completions for the 'server' subcommand # Completions for the 'server' subcommand
# #
complete -c cvs -n 'contains \'server\' (commandline -poc)' -s c -x -d 'Path to an alternative CVS config file.' complete -c cvs -n 'contains \'server\' (commandline -pxc)' -s c -x -d 'Path to an alternative CVS config file.'
# #
# Completions for the 'status' subcommand # Completions for the 'status' subcommand
# #
complete -c cvs -n 'contains \'status\' (commandline -poc)' -s v -d 'Verbose format; includes tag information for the file' complete -c cvs -n 'contains \'status\' (commandline -pxc)' -s v -d 'Verbose format; includes tag information for the file'
complete -c cvs -n 'contains \'status\' (commandline -poc)' -s l -d 'Process this directory only (not recursive).' complete -c cvs -n 'contains \'status\' (commandline -pxc)' -s l -d 'Process this directory only (not recursive).'
complete -c cvs -n 'contains \'status\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'status\' (commandline -pxc)' -s R -d 'Process directories recursively.'
# #
# Completions for the 'tag' subcommand # Completions for the 'tag' subcommand
# #
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s b -d 'Make the tag a "branch" tag, allowing concurrent development.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s b -d 'Make the tag a "branch" tag, allowing concurrent development.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s B -d 'Allows -F and -d to disturb branch tags. Use with extreme care.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s B -d 'Allows -F and -d to disturb branch tags. Use with extreme care.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s c -d 'Check that working files are unmodified.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s c -d 'Check that working files are unmodified.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s d -d 'Delete the given tag.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s d -d 'Delete the given tag.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s F -d 'Move tag if it already exists.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s F -d 'Move tag if it already exists.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s f -d 'Force a head revision match if tag/date not found.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s f -d 'Force a head revision match if tag/date not found.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s l -d 'Local directory only, not recursive.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s l -d 'Local directory only, not recursive.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s r -x -d 'Existing revision/tag.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s r -x -d 'Existing revision/tag.'
complete -c cvs -n 'contains \'tag\' (commandline -poc)' -s D -d 'Existing date.' complete -c cvs -n 'contains \'tag\' (commandline -pxc)' -s D -d 'Existing date.'
# #
# Completions for the 'unedit' subcommand # Completions for the 'unedit' subcommand
# #
complete -c cvs -n 'contains \'unedit\' (commandline -poc)' -s l -d 'Local directory only, not recursive.' complete -c cvs -n 'contains \'unedit\' (commandline -pxc)' -s l -d 'Local directory only, not recursive.'
complete -c cvs -n 'contains \'unedit\' (commandline -poc)' -s R -d 'Process directories recursively (default).' complete -c cvs -n 'contains \'unedit\' (commandline -pxc)' -s R -d 'Process directories recursively (default).'
# #
# Completions for the 'update' subcommand # Completions for the 'update' subcommand
# #
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s A -d 'Reset any sticky tags/date/kopts.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s A -d 'Reset any sticky tags/date/kopts.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s P -d 'Prune empty directories.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s P -d 'Prune empty directories.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s C -d 'Overwrite locally modified files with clean repository copies.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s C -d 'Overwrite locally modified files with clean repository copies.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s d -d 'Build directories, like checkout does.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s d -d 'Build directories, like checkout does.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s f -d 'Force a head revision match if tag/date not found.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s f -d 'Force a head revision match if tag/date not found.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s l -d 'Local directory only, no recursion.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s l -d 'Local directory only, no recursion.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s R -d 'Process directories recursively.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s R -d 'Process directories recursively.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s p -d 'Send updates to standard output (avoids stickiness).' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s p -d 'Send updates to standard output (avoids stickiness).'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s k -x -d 'Use RCS kopt -k option on checkout. (is sticky)' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s k -x -d 'Use RCS kopt -k option on checkout. (is sticky)'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s r -x -d 'Update using specified revision/tag (is sticky).' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s r -x -d 'Update using specified revision/tag (is sticky).'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s D -x -d 'Set date to update from (is sticky).' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s D -x -d 'Set date to update from (is sticky).'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s j -x -d 'Merge in changes made between current revision and rev.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s j -x -d 'Merge in changes made between current revision and rev.'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s I -x -d 'More files to ignore (! to reset).' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s I -x -d 'More files to ignore (! to reset).'
complete -c cvs -n 'contains \'update\' (commandline -poc)' -s W -x -d 'Wrappers specification line.' complete -c cvs -n 'contains \'update\' (commandline -pxc)' -s W -x -d 'Wrappers specification line.'
# #
@@ -496,14 +496,14 @@ complete -c cvs -n 'contains \'update\' (commandline -poc)' -s W -x -d 'Wrappers
# Completions for the 'watch' subcommand # Completions for the 'watch' subcommand
# #
complete -c cvs -n 'contains \'watch\' (commandline -poc)' -s l -x -a 'on off add remove' -d 'Local directory only, not recursive.' complete -c cvs -n 'contains \'watch\' (commandline -pxc)' -s l -x -a 'on off add remove' -d 'Local directory only, not recursive.'
complete -c cvs -n 'contains \'watch\' (commandline -poc)' -s R -x -a 'on off add remove' -d 'Process directories recursively (default).' complete -c cvs -n 'contains \'watch\' (commandline -pxc)' -s R -x -a 'on off add remove' -d 'Process directories recursively (default).'
complete -c cvs -n 'contains \'watch\' (commandline -poc)' -s a -x -a 'add remove' -d 'Specify what actions, one of: `edit\', `unedit\',' complete -c cvs -n 'contains \'watch\' (commandline -pxc)' -s a -x -a 'add remove' -d 'Specify what actions, one of: `edit\', `unedit\','
# #
# Completions for the 'watchers' subcommand # Completions for the 'watchers' subcommand
# #
complete -c cvs -n 'contains \'watchers\' (commandline -poc)' -s l -d 'Process this directory only (not recursive).' complete -c cvs -n 'contains \'watchers\' (commandline -pxc)' -s l -d 'Process this directory only (not recursive).'
complete -c cvs -n 'contains \'watchers\' (commandline -poc)' -s R -d 'Process directories recursively (default).' complete -c cvs -n 'contains \'watchers\' (commandline -pxc)' -s R -d 'Process directories recursively (default).'

View File

@@ -70,7 +70,7 @@ set -l metadata_opts '
' '
function __fish_cwebp_is_first_arg_or_its_value -a arg -d 'Like __fish_is_first_arg, but also returns true for the second token after a given parameter' function __fish_cwebp_is_first_arg_or_its_value -a arg -d 'Like __fish_is_first_arg, but also returns true for the second token after a given parameter'
set -l tokens (commandline -co) set -l tokens (commandline -cx)
switch (count $tokens) switch (count $tokens)
case 1 case 1

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
# #
function __fish_doas_print_remaining_args function __fish_doas_print_remaining_args
set -l tokens (commandline -opc) (commandline -ct) set -l tokens (commandline -xpc) (commandline -ct)
set -e tokens[1] set -e tokens[1]
# These are all the options mentioned in the man page for openbsd's "doas" (in that order). # These are all the options mentioned in the man page for openbsd's "doas" (in that order).
set -l opts a= C= L n s u= set -l opts a= C= L n s u=

View File

@@ -1,7 +1,7 @@
# dscacheutil # dscacheutil
complete -c dscacheutil -f -d 'Directory Service cache utility' complete -c dscacheutil -f -d 'Directory Service cache utility'
complete -c dscacheutil -s h -d 'lists options' -f -n '[ (commandline -opc | count) -le 1 ]' complete -c dscacheutil -s h -d 'lists options' -f -n '[ (commandline -xpc | count) -le 1 ]'
complete -c dscacheutil -s q -d 'initiate query' -f -x -n '[ (commandline -opc | count) -le 1 ] || contains -- -a (commandline -opc) || contains -- -q (commandline -opc) && [ (commandline -opc | count) -lt 3 ]' -a " complete -c dscacheutil -s q -d 'initiate query' -f -x -n '[ (commandline -xpc | count) -le 1 ] || contains -- -a (commandline -xpc) || contains -- -q (commandline -xpc) && [ (commandline -xpc | count) -lt 3 ]' -a "
group\t'name or gid' group\t'name or gid'
host\t'name or ip address' host\t'name or ip address'
mount\t'name' mount\t'name'
@@ -10,10 +10,10 @@ rpc\t'name or number'
service\t'name or port' service\t'name or port'
user\t'name or uid' user\t'name or uid'
" "
complete -c dscacheutil -s a -d '-q: specific key & value' -f -n 'contains -- -q (commandline -opc)' complete -c dscacheutil -s a -d '-q: specific key & value' -f -n 'contains -- -q (commandline -xpc)'
complete -c dscacheutil -o cachedump -d 'dump cache overview' -f -n '[ (commandline -opc | count) -le 1 ]' complete -c dscacheutil -o cachedump -d 'dump cache overview' -f -n '[ (commandline -xpc | count) -le 1 ]'
complete -c dscacheutil -o buckets -d 'show hash buckets' -f -n 'contains -- -cachedump (commandline -opc)' complete -c dscacheutil -o buckets -d 'show hash buckets' -f -n 'contains -- -cachedump (commandline -xpc)'
complete -c dscacheutil -o entries -d '-cachedump: cache entries' -f -n 'contains -- -cachedump (commandline -opc)' -a " complete -c dscacheutil -o entries -d '-cachedump: cache entries' -f -n 'contains -- -cachedump (commandline -xpc)' -a "
group\t'name or gid' group\t'name or gid'
host\t'name or ip address' host\t'name or ip address'
mount\t'name' mount\t'name'
@@ -22,6 +22,6 @@ rpc\t'name or number'
service\t'name or port' service\t'name or port'
user\t'name or uid' user\t'name or uid'
" "
complete -c dscacheutil -o configuration -d 'print current config' -f -n '[ (commandline -opc | count) -le 1 ]' complete -c dscacheutil -o configuration -d 'print current config' -f -n '[ (commandline -xpc | count) -le 1 ]'
complete -c dscacheutil -o statistics -d 'prints cache stats' -f -n '[ (commandline -opc | count) -le 1 ]' complete -c dscacheutil -o statistics -d 'prints cache stats' -f -n '[ (commandline -xpc | count) -le 1 ]'
complete -c dscacheutil -o flushcache -d 'reset cache (DNS )' -f -k -n '[ (commandline -opc | count) -le 1 ]' complete -c dscacheutil -o flushcache -d 'reset cache (DNS )' -f -k -n '[ (commandline -xpc | count) -le 1 ]'

View File

@@ -1,5 +1,5 @@
function __fish_seen_ebuild_arg -d "Test if an ebuild-argument has been given in the current commandline" function __fish_seen_ebuild_arg -d "Test if an ebuild-argument has been given in the current commandline"
commandline -opc | string match -q '*.ebuild' commandline -xpc | string match -q '*.ebuild'
end end
## Opts ## Opts

View File

@@ -5,7 +5,7 @@ end
# Returns 0 if we're after `env` and all previous tokens have an equal sign # Returns 0 if we're after `env` and all previous tokens have an equal sign
function __fish_env_defining_vars function __fish_env_defining_vars
not string match -ev -- = (commandline -op)[2..-2] | string match -rq . not string match -ev -- = (commandline -xp)[2..-2] | string match -rq .
end end
# Returns 0 if we're after `env` and all previous tokens have not yet contained an equal sign # Returns 0 if we're after `env` and all previous tokens have not yet contained an equal sign
@@ -17,7 +17,7 @@ end
function __fish_env_redefine_vars function __fish_env_redefine_vars
set -l vars (set --names -x) set -l vars (set --names -x)
set cmdline "$(commandline -op)" set cmdline "$(commandline -xp)"
for var in $vars for var in $vars
if not string match -e -- $var= $cmdline if not string match -e -- $var= $cmdline
echo $var= echo $var=
@@ -56,7 +56,7 @@ end
# Get the text after all env arguments and variables, so we can complete it as a regular command # Get the text after all env arguments and variables, so we can complete it as a regular command
function __fish_env_remaining_args -V is_gnu function __fish_env_remaining_args -V is_gnu
set -l argv (commandline -opc) (commandline -ct) set -l argv (commandline -xpc) (commandline -ct)
if set -q is_gnu[1] if set -q is_gnu[1]
argparse -s i/ignore-environment u/unset= help version -- $argv 2>/dev/null argparse -s i/ignore-environment u/unset= help version -- $argv 2>/dev/null
or return 0 or return 0

View File

@@ -9,13 +9,13 @@ end
function __fish_complete_eselect_actions function __fish_complete_eselect_actions
set -l sedregexp 's/^ ([a-zA-Z0-9_-]*)[ ]*/\1\t/g' set -l sedregexp 's/^ ([a-zA-Z0-9_-]*)[ ]*/\1\t/g'
set -l cmdl (commandline -poc) set -l cmdl (commandline -pxc)
__fish_eselect_cmd $cmdl[2..-1] usage | string match -r '^ [^ -]' | sed -r $sedregexp __fish_eselect_cmd $cmdl[2..-1] usage | string match -r '^ [^ -]' | sed -r $sedregexp
end end
function __fish_complete_eselect_action_options function __fish_complete_eselect_action_options
set -l parseregexp 's/^ ([a-zA-Z0-9_-]*)[ ]*/\1\t/g' set -l parseregexp 's/^ ([a-zA-Z0-9_-]*)[ ]*/\1\t/g'
set -l cmdl (commandline -poc) set -l cmdl (commandline -pxc)
# Alter further php completion # Alter further php completion
if test (__fish_print_cmd_args_without_options)[2] = php if test (__fish_print_cmd_args_without_options)[2] = php
@@ -44,7 +44,7 @@ end
function __fish_complete_eselect_targets function __fish_complete_eselect_targets
set -l sedregexp 's/^ \[([0-9]+)\][ ]*/\1\t/g' set -l sedregexp 's/^ \[([0-9]+)\][ ]*/\1\t/g'
set -l cmdl (commandline -poc) set -l cmdl (commandline -pxc)
# Disable further php completion # Disable further php completion
if test (__fish_print_cmd_args_without_options)[2] = php if test (__fish_print_cmd_args_without_options)[2] = php

View File

@@ -1,2 +1,2 @@
complete -c exec -n 'test (count (commandline -opc)) -eq 1' -s h -l help -d 'Display help and exit' complete -c exec -n 'test (count (commandline -xpc)) -eq 1' -s h -l help -d 'Display help and exit'
complete -c exec -xa "(__fish_complete_subcommand)" complete -c exec -xa "(__fish_complete_subcommand)"

View File

@@ -1,5 +1,5 @@
function __fish_exercism_no_subcommand -d 'Test if exercism has yet to be given the subcommand' function __fish_exercism_no_subcommand -d 'Test if exercism has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i demo debug configure fetch restore submit unsubmit tracks download help if contains -- $i demo debug configure fetch restore submit unsubmit tracks download help
return 1 return 1
end end

View File

@@ -1,5 +1,5 @@
function __fish_exif_target_file_tags function __fish_exif_target_file_tags
for target in (string match -v -- '-*' (commandline -po)[2..]) for target in (string match -v -- '-*' (commandline -px)[2..])
string replace -f '*' '' (exif --list-tags "$target" 2> /dev/null)[2..] | string replace -r '(\s+-){4}' '' | string split -m1 ' ' | string trim string replace -f '*' '' (exif --list-tags "$target" 2> /dev/null)[2..] | string replace -r '(\s+-){4}' '' | string split -m1 ' ' | string trim
end end
end end

View File

@@ -1,7 +1,7 @@
set -l commands flashall getvar oem flashing reboot update erase format devices flash get_staged help stage boot fetch set -l commands flashall getvar oem flashing reboot update erase format devices flash get_staged help stage boot fetch
function __fish_fastboot_list_partition_or_file function __fish_fastboot_list_partition_or_file
set -l tokens (commandline -opc) set -l tokens (commandline -xpc)
# if last 2 token is flash, then list file # if last 2 token is flash, then list file
if test (count $tokens) -gt 2 if test (count $tokens) -gt 2
if test $tokens[-2] = flash if test $tokens[-2] = flash

View File

@@ -1,5 +1,5 @@
function __fish_ffmpeg_last_arg function __fish_ffmpeg_last_arg
echo (commandline -co)[-1] echo (commandline -cx)[-1]
end end
# Allow completions to match against an argument that includes a stream specifier, e.g. -c:v:2 # Allow completions to match against an argument that includes a stream specifier, e.g. -c:v:2
@@ -56,7 +56,7 @@ function __fish_ffmpeg_pix_fmts
# could be to instead provide a second input, but we can rule out an output if no input has # could be to instead provide a second input, but we can rule out an output if no input has
# been specified # been specified
set -l regex_filter '.' set -l regex_filter '.'
if contains -- -i (commandline -co) if contains -- -i (commandline -cx)
set regex_filter '^I' set regex_filter '^I'
end end
ffmpeg -hide_banner -loglevel quiet -pix_fmts | ffmpeg -hide_banner -loglevel quiet -pix_fmts |
@@ -290,7 +290,7 @@ function __fish_ffmpeg_complete_filter
# echo -e "\n **** $filter_type **** \n" > /dev/tty # echo -e "\n **** $filter_type **** \n" > /dev/tty
set -l filters_arg (commandline -op)[-1] set -l filters_arg (commandline -xp)[-1]
if string match -rq -- '^-' $filters_arg if string match -rq -- '^-' $filters_arg
# No filter name started # No filter name started
__fish_ffmpeg_filters $filter_type __fish_ffmpeg_filters $filter_type

View File

@@ -1,3 +1,3 @@
complete -c for -n 'test (count (commandline -opc)) -eq 1' -s h -l help -d 'Display help and exit' complete -c for -n 'test (count (commandline -xpc)) -eq 1' -s h -l help -d 'Display help and exit'
complete -c for -n 'test (count (commandline -opc)) -eq 1' -f complete -c for -n 'test (count (commandline -xpc)) -eq 1' -f
complete -c for -n 'test (count (commandline -opc)) -eq 2' -xa in complete -c for -n 'test (count (commandline -xpc)) -eq 2' -xa in

View File

@@ -6,37 +6,37 @@ function __fish_fossil
end end
function __fish_fossil_needs_command function __fish_fossil_needs_command
test (count (commandline -poc)) -eq 1 test (count (commandline -pxc)) -eq 1
end end
function __fish_fossil_command function __fish_fossil_command
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
test (count $cmd) -gt 1 test (count $cmd) -gt 1
and contains -- $cmd[2] $argv and contains -- $cmd[2] $argv
end end
function __fish_fossil_subcommand function __fish_fossil_subcommand
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
test (count $cmd) -eq 2 test (count $cmd) -eq 2
and test $argv[1] = $cmd[2] and test $argv[1] = $cmd[2]
end end
function __fish_fossil_subsubcommand function __fish_fossil_subsubcommand
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
test (count $cmd) -ge 3 test (count $cmd) -ge 3
and test $argv[1] = $cmd[2] and test $argv[1] = $cmd[2]
and test $argv[2] = $cmd[3] and test $argv[2] = $cmd[3]
end end
function __fish_fossil_subsubcommand_only function __fish_fossil_subsubcommand_only
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
test (count $cmd) -eq 3 test (count $cmd) -eq 3
and test $argv[1] = $cmd[2] and test $argv[1] = $cmd[2]
and test $argv[2] = $cmd[3] and test $argv[2] = $cmd[3]
end end
function __fish_fossil_subsubsubcommand_only function __fish_fossil_subsubsubcommand_only
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
test (count $cmd) -eq 4 test (count $cmd) -eq 4
and test $argv[1] = $cmd[2] and test $argv[1] = $cmd[2]
and test $argv[2] = $cmd[3] and test $argv[2] = $cmd[3]

View File

@@ -43,7 +43,7 @@ complete $common_opt -l debug -d "Turn on Ruby debugging"
## ##
# cert # cert
set -l cert_opt -c gem -n 'contains cert (commandline -poc)' set -l cert_opt -c gem -n 'contains cert (commandline -pxc)'
complete $cert_opt -s a -l add -d "Add a trusted certificate" -x complete $cert_opt -s a -l add -d "Add a trusted certificate" -x
complete $cert_opt -s l -l list -d "List trusted certificates" complete $cert_opt -s l -l list -d "List trusted certificates"
complete $cert_opt -s r -l remove -d "Remove trusted certificates containing STRING" -x complete $cert_opt -s r -l remove -d "Remove trusted certificates containing STRING" -x
@@ -54,7 +54,7 @@ complete $cert_opt -s s -l sign -d "Sign a certificate with my key and certifica
## ##
# check # check
set -l check_opt -c gem -n 'contains check (commandline -poc)' set -l check_opt -c gem -n 'contains check (commandline -pxc)'
complete $check_opt -s v -l verify -d "Verify gem file against its internal checksum" -x complete $check_opt -s v -l verify -d "Verify gem file against its internal checksum" -x
complete $check_opt -s a -l alien -d "Report 'unmanaged' or rogue files in the gem repository" complete $check_opt -s a -l alien -d "Report 'unmanaged' or rogue files in the gem repository"
complete $check_opt -s t -l test -d "Run unit tests for gem" complete $check_opt -s t -l test -d "Run unit tests for gem"
@@ -62,12 +62,12 @@ complete $check_opt -s V -l version -d "Specify version for which to run unit te
## ##
# cleanup # cleanup
set -l cleanup_opt -c gem -n 'contains cleanup (commandline -poc)' set -l cleanup_opt -c gem -n 'contains cleanup (commandline -pxc)'
complete $cleanup_opt -s d -l dryrun -d "Don't really cleanup" complete $cleanup_opt -s d -l dryrun -d "Don't really cleanup"
## ##
# contents # contents
set -l contents_opt -c gem -n 'contains contents (commandline -poc)' set -l contents_opt -c gem -n 'contains contents (commandline -pxc)'
complete $contents_opt -s l -l list -d "List the files inside a Gem" complete $contents_opt -s l -l list -d "List the files inside a Gem"
complete $contents_opt -s V -l version -d "Specify version for gem to view" complete $contents_opt -s V -l version -d "Specify version for gem to view"
complete $contents_opt -s s -l spec-dir -d "Search for gems under specific paths" -x complete $contents_opt -s s -l spec-dir -d "Search for gems under specific paths" -x
@@ -75,7 +75,7 @@ complete $contents_opt -s v -l verbose -d "Be verbose when showing status"
## ##
# dependency # dependency
set -l dep_opt -c gem -n 'contains dependency (commandline -poc)' set -l dep_opt -c gem -n 'contains dependency (commandline -pxc)'
complete $dep_opt -s v -l version -d "Specify version of gem to uninstall" -x complete $dep_opt -s v -l version -d "Specify version of gem to uninstall" -x
complete $dep_opt -s r -l reverse-dependencies -d "Include reverse dependencies in the output" complete $dep_opt -s r -l reverse-dependencies -d "Include reverse dependencies in the output"
complete $dep_opt -l no-reverse-dependencies -d "Don't include reverse dependencies in the output" complete $dep_opt -l no-reverse-dependencies -d "Don't include reverse dependencies in the output"
@@ -83,17 +83,17 @@ complete $dep_opt -s p -l pipe -d "Pipe Format (name --version ver)"
## ##
# environment # environment
set -l env_opt -c gem -n 'contains environment (commandline -poc)' set -l env_opt -c gem -n 'contains environment (commandline -pxc)'
complete $env_opt -xa "packageversion\t'display the package version' gemdir\t'display the path where gems are installed' gempath\t'display path used to search for gems' version\t'display the gem format version' remotesources\t'display the remote gem servers'" complete $env_opt -xa "packageversion\t'display the package version' gemdir\t'display the path where gems are installed' gempath\t'display path used to search for gems' version\t'display the gem format version' remotesources\t'display the remote gem servers'"
## ##
# help # help
set -l help_opt -c gem -n 'contains help (commandline -poc)' set -l help_opt -c gem -n 'contains help (commandline -pxc)'
complete $help_opt -xa "commands\t'list all gem commands' examples\t'show some examples of usage' build cert check cleanup contents dependency environment help install list query rdoc search specification uninstall unpack update" complete $help_opt -xa "commands\t'list all gem commands' examples\t'show some examples of usage' build cert check cleanup contents dependency environment help install list query rdoc search specification uninstall unpack update"
## ##
# install # install
set -l install_opt -c gem -n 'contains install (commandline -poc)' set -l install_opt -c gem -n 'contains install (commandline -pxc)'
complete $install_opt -s v -l version -d "Specify version of gem to install" -x complete $install_opt -s v -l version -d "Specify version of gem to install" -x
complete $install_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)" complete $install_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)"
complete $install_opt -s r -l remote -d "Restrict operations to the REMOTE domain" complete $install_opt -s r -l remote -d "Restrict operations to the REMOTE domain"
@@ -113,7 +113,7 @@ complete $install_opt -s y -l include-dependencies -d "Unconditionally install t
## ##
# list # list
set -l list_opt -c gem -n 'contains list (commandline -poc)' set -l list_opt -c gem -n 'contains list (commandline -pxc)'
complete $list_opt -s d -l details -d "Display detailed information of gem(s)" complete $list_opt -s d -l details -d "Display detailed information of gem(s)"
complete $list_opt -l no-details -d "Don't display detailed information of gem(s)" complete $list_opt -l no-details -d "Don't display detailed information of gem(s)"
complete $list_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)" complete $list_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)"
@@ -122,7 +122,7 @@ complete $list_opt -s b -l both -d "Allow LOCAL and REMOTE operations"
## ##
# query # query
set -l query_opt -c gem -n 'contains query (commandline -poc)' set -l query_opt -c gem -n 'contains query (commandline -pxc)'
complete $query_opt -s n -l name-matches -d "Name of gem(s) to query on matches the provided REGEXP" -x complete $query_opt -s n -l name-matches -d "Name of gem(s) to query on matches the provided REGEXP" -x
complete $query_opt -s d -l details -d "Display detailed information of gem(s)" complete $query_opt -s d -l details -d "Display detailed information of gem(s)"
complete $query_opt -l no-details -d "Don't display detailed information of gem(s)" complete $query_opt -l no-details -d "Don't display detailed information of gem(s)"
@@ -132,7 +132,7 @@ complete $query_opt -s b -l both -d "Allow LOCAL and REMOTE operations"
## ##
# rdoc # rdoc
set -l rdoc_opt -c gem -n 'contains rdoc (commandline -poc)' set -l rdoc_opt -c gem -n 'contains rdoc (commandline -pxc)'
complete $rdoc_opt -l all -d "Generate RDoc/RI documentation for all installed gems" complete $rdoc_opt -l all -d "Generate RDoc/RI documentation for all installed gems"
complete $rdoc_opt -l rdoc -d "Include RDoc generated documents" complete $rdoc_opt -l rdoc -d "Include RDoc generated documents"
complete $rdoc_opt -l no-rdoc -d "Don't include RDoc generated documents" complete $rdoc_opt -l no-rdoc -d "Don't include RDoc generated documents"
@@ -142,7 +142,7 @@ complete $rdoc_opt -s v -l version -d "Specify version of gem to rdoc" -x
## ##
# search # search
set -l search_opt -c gem -n 'contains search (commandline -poc)' set -l search_opt -c gem -n 'contains search (commandline -pxc)'
complete $search_opt -s d -l details -d "Display detailed information of gem(s)" complete $search_opt -s d -l details -d "Display detailed information of gem(s)"
complete $search_opt -l no-details -d "Don't display detailed information of gem(s)" complete $search_opt -l no-details -d "Don't display detailed information of gem(s)"
complete $search_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)" complete $search_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)"
@@ -151,7 +151,7 @@ complete $search_opt -s b -l both -d "Allow LOCAL and REMOTE operations"
## ##
# specification # specification
set -l specification_opt -c gem -n 'contains specification (commandline -poc)' set -l specification_opt -c gem -n 'contains specification (commandline -pxc)'
complete $specification_opt -s v -l version -d "Specify version of gem to examine" -x complete $specification_opt -s v -l version -d "Specify version of gem to examine" -x
complete $specification_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)" complete $specification_opt -s l -l local -d "Restrict operations to the LOCAL domain (default)"
complete $specification_opt -s r -l remote -d "Restrict operations to the REMOTE domain" complete $specification_opt -s r -l remote -d "Restrict operations to the REMOTE domain"
@@ -160,7 +160,7 @@ complete $specification_opt -l all -d "Output specifications for all versions of
## ##
# uninstall # uninstall
set -l uninstall_opt -c gem -n 'contains uninstall (commandline -poc)' set -l uninstall_opt -c gem -n 'contains uninstall (commandline -pxc)'
complete $uninstall_opt -s a -l all -d "Uninstall all matching versions" complete $uninstall_opt -s a -l all -d "Uninstall all matching versions"
complete $uninstall_opt -l no-all -d "Don't uninstall all matching versions" complete $uninstall_opt -l no-all -d "Don't uninstall all matching versions"
complete $uninstall_opt -s i -l ignore-dependencies -d "Ignore dependency requirements while uninstalling" complete $uninstall_opt -s i -l ignore-dependencies -d "Ignore dependency requirements while uninstalling"
@@ -171,12 +171,12 @@ complete $uninstall_opt -s v -l version -d "Specify version of gem to uninstall"
## ##
# unpack # unpack
set -l unpack_opt -c gem -n 'contains unpack (commandline -poc)' set -l unpack_opt -c gem -n 'contains unpack (commandline -pxc)'
complete $unpack_opt -s v -l version -d "Specify version of gem to unpack" -x complete $unpack_opt -s v -l version -d "Specify version of gem to unpack" -x
## ##
# update # update
set -l update_opt -c gem -n 'contains update (commandline -poc)' set -l update_opt -c gem -n 'contains update (commandline -pxc)'
complete $update_opt -s i -l install-dir -d "Gem repository directory to get installed gems" complete $update_opt -s i -l install-dir -d "Gem repository directory to get installed gems"
complete $update_opt -s N -l no-document -d "Disable documentation generation on update" complete $update_opt -s N -l no-document -d "Disable documentation generation on update"
complete $update_opt -l document -a '(__fish_append , rdoc ri)' -d "Specify the documentation types you wish to generate" complete $update_opt -l document -a '(__fish_append , rdoc ri)' -d "Specify the documentation types you wish to generate"

View File

@@ -5,7 +5,7 @@
function __fish_git function __fish_git
set -l saved_args $argv set -l saved_args $argv
set -l global_args set -l global_args
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
# We assume that git is the first command until we have a better awareness of subcommands, see #2705. # We assume that git is the first command until we have a better awareness of subcommands, see #2705.
set -e cmd[1] set -e cmd[1]
if argparse -s (__fish_git_global_optspecs) -- $cmd 2>/dev/null if argparse -s (__fish_git_global_optspecs) -- $cmd 2>/dev/null
@@ -525,7 +525,7 @@ end
# Provides __fish_git_rev_files completions for the current token # Provides __fish_git_rev_files completions for the current token
function __fish_git_complete_rev_files function __fish_git_complete_rev_files
set -l split (string split -m 1 ":" -- (commandline -ot)) set -l split (string split -m 1 ":" -- (commandline -xt))
set -l rev $split[1] set -l rev $split[1]
set -l path $split[2] set -l path $split[2]
@@ -540,11 +540,11 @@ function __fish_git_needs_rev_files
# This definitely works with `git show` to retrieve a copy of a file as it exists # This definitely works with `git show` to retrieve a copy of a file as it exists
# in the index of revision $rev, it should be updated to include others as they # in the index of revision $rev, it should be updated to include others as they
# are identified. # are identified.
__fish_git_using_command show; and string match -r "^[^-].*:" -- (commandline -ot) __fish_git_using_command show; and string match -r "^[^-].*:" -- (commandline -xt)
end end
function __fish_git_ranges function __fish_git_ranges
set -l both (commandline -ot | string replace -r '\.{2,3}' \n\$0\n) set -l both (commandline -xt | string replace -r '\.{2,3}' \n\$0\n)
set -l from $both[1] set -l from $both[1]
set -l dots $both[2] set -l dots $both[2]
# If we didn't need to split (or there's nothing _to_ split), complete only the first part # If we didn't need to split (or there's nothing _to_ split), complete only the first part
@@ -591,7 +591,7 @@ function __fish_git_needs_command
end end
set -g __fish_git_cmdline $cmdline set -g __fish_git_cmdline $cmdline
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -e cmd[1] set -e cmd[1]
argparse -s (__fish_git_global_optspecs) -- $cmd 2>/dev/null argparse -s (__fish_git_global_optspecs) -- $cmd 2>/dev/null
or return 0 or return 0
@@ -730,7 +730,7 @@ function __fish_git_contains_opt
return 1 return 1
end end
function __fish_git_stash_using_command function __fish_git_stash_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
__fish_git_using_command stash __fish_git_using_command stash
or return 2 or return 2
# The word after the stash command _must_ be the subcommand # The word after the stash command _must_ be the subcommand
@@ -744,7 +744,7 @@ function __fish_git_stash_using_command
end end
function __fish_git_stash_not_using_subcommand function __fish_git_stash_not_using_subcommand
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
__fish_git_using_command stash __fish_git_using_command stash
or return 2 or return 2
set cmd $cmd[(contains -i -- "stash" $cmd)..-1] set cmd $cmd[(contains -i -- "stash" $cmd)..-1]
@@ -792,7 +792,7 @@ end
function __fish_git_branch_for_remote function __fish_git_branch_for_remote
set -l remotes (__fish_git_remotes) set -l remotes (__fish_git_remotes)
set -l remote set -l remote
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
for r in $remotes for r in $remotes
if contains -- $r $cmd if contains -- $r $cmd
set remote $r set remote $r
@@ -1075,12 +1075,12 @@ complete -f -c git -n "__fish_git_using_command remote" -n "__fish_seen_subcomma
### show ### show
complete -f -c git -n __fish_git_needs_command -a show -d 'Show the last commit of a branch' complete -f -c git -n __fish_git_needs_command -a show -d 'Show the last commit of a branch'
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_branches)' complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_branches)'
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_tags)' -d Tag complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_tags)' -d Tag
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_commits)' complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_commits)'
complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_complete_stashes)' complete -f -c git -n '__fish_git_using_command show' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_complete_stashes)'
complete -f -c git -n __fish_git_needs_rev_files -n 'not contains -- -- (commandline -opc)' -xa '(__fish_git_complete_rev_files)' complete -f -c git -n __fish_git_needs_rev_files -n 'not contains -- -- (commandline -xpc)' -xa '(__fish_git_complete_rev_files)'
complete -F -c git -n '__fish_git_using_command show' -n 'contains -- -- (commandline -opc)' complete -F -c git -n '__fish_git_using_command show' -n 'contains -- -- (commandline -xpc)'
complete -f -c git -n '__fish_git_using_command show' -l format -d 'Pretty-print the contents of the commit logs in a given format' -a '(__fish_git_show_opt format)' complete -f -c git -n '__fish_git_using_command show' -l format -d 'Pretty-print the contents of the commit logs in a given format' -a '(__fish_git_show_opt format)'
complete -f -c git -n '__fish_git_using_command show' -l abbrev-commit -d 'Show only a partial hexadecimal commit object name' complete -f -c git -n '__fish_git_using_command show' -l abbrev-commit -d 'Show only a partial hexadecimal commit object name'
complete -f -c git -n '__fish_git_using_command show' -l no-abbrev-commit -d 'Show the full 40-byte hexadecimal commit object name' complete -f -c git -n '__fish_git_using_command show' -l no-abbrev-commit -d 'Show the full 40-byte hexadecimal commit object name'
@@ -1164,15 +1164,15 @@ complete -f -c git -n '__fish_git_using_command am' -l quit -d 'Abort without re
complete -c git -n '__fish_git_using_command am' -l show-current-patch -a 'diff raw' -d 'Show message at which patch failures occured' complete -c git -n '__fish_git_using_command am' -l show-current-patch -a 'diff raw' -d 'Show message at which patch failures occured'
### checkout ### checkout
complete -F -c git -n '__fish_git_using_command checkout' -n 'contains -- -- (commandline -opc)' complete -F -c git -n '__fish_git_using_command checkout' -n 'contains -- -- (commandline -xpc)'
complete -f -c git -n __fish_git_needs_command -a checkout -d 'Checkout and switch to a branch' complete -f -c git -n __fish_git_needs_command -a checkout -d 'Checkout and switch to a branch'
# The following dynamic, order-preserved (-k) completions will be shown in reverse order (see #9221) # The following dynamic, order-preserved (-k) completions will be shown in reverse order (see #9221)
complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_recent_commits --all)' complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_recent_commits --all)'
complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_tags)' -d Tag complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_tags)' -d Tag
complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_heads)' -d Head complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_heads)' -d Head
complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch' complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_unique_remote_branches)' -d 'Unique Remote Branch'
complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_branches)' complete -f -c git -n '__fish_git_using_command checkout' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_branches)'
# In the presence of changed files, `git checkout ...` assumes highest likelihood is intent to restore so this comes last (aka shown first). # In the presence of changed files, `git checkout ...` assumes highest likelihood is intent to restore so this comes last (aka shown first).
complete -f -c git -n '__fish_git_using_command checkout' -ka '(__fish_git_files modified deleted modified-staged-deleted)' complete -f -c git -n '__fish_git_using_command checkout' -ka '(__fish_git_files modified deleted modified-staged-deleted)'
@@ -1247,7 +1247,7 @@ complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcomma
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l term-old -l term-good -x -d 'Use another term instead of old/good' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l term-old -l term-good -x -d 'Use another term instead of old/good'
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l no-checkout -d 'Do not checkout tree, only update BISECT_HEAD' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l no-checkout -d 'Do not checkout tree, only update BISECT_HEAD'
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l first-parent -d 'On merge commits, follow only the first parent commit' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -l first-parent -d 'On merge commits, follow only the first parent commit'
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_refs)' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from start' -n 'not contains -- -- (commandline -xpc)' -a '(__fish_git_refs)'
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from bad new good old' -a '(__fish_git_refs)' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from bad new good old' -a '(__fish_git_refs)'
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from terms' -l --term-good -d 'Print the term for the old state' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from terms' -l --term-good -d 'Print the term for the old state'
complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from terms' -l --term-bad -d 'Print the term for the new state' complete -f -c git -n '__fish_git_using_command bisect' -n '__fish_seen_subcommand_from terms' -l --term-bad -d 'Print the term for the new state'
@@ -1409,8 +1409,8 @@ complete -f -c git -n '__fish_git_using_command describe' -l first-parent -d 'Fo
### diff ### diff
complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits and working tree' complete -c git -n __fish_git_needs_command -a diff -d 'Show changes between commits and working tree'
complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_ranges)' complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_ranges)'
complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_complete_stashes)' complete -c git -n '__fish_git_using_command diff' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_complete_stashes)'
complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index' complete -c git -n '__fish_git_using_command diff' -l cached -d 'Show diff of changes in the index'
complete -c git -n '__fish_git_using_command diff' -l staged -d 'Show diff of changes in the index' complete -c git -n '__fish_git_using_command diff' -l staged -d 'Show diff of changes in the index'
complete -c git -n '__fish_git_using_command diff' -l no-index -d 'Compare two paths on the filesystem' complete -c git -n '__fish_git_using_command diff' -l no-index -d 'Compare two paths on the filesystem'
@@ -1422,7 +1422,7 @@ complete -c git -n '__fish_git_using_command diff' -s 3 -l theirs -d 'Compare th
complete -c git -n '__fish_git_using_command diff' -s 0 -d 'Omit diff output for unmerged entries and just show "Unmerged"' complete -c git -n '__fish_git_using_command diff' -s 0 -d 'Omit diff output for unmerged entries and just show "Unmerged"'
complete -c git -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt cached staged' -a '( complete -c git -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt cached staged' -a '(
set -l kinds modified set -l kinds modified
contains -- -- (commandline -opc) && set -a kinds deleted modified-staged-deleted contains -- -- (commandline -xpc) && set -a kinds deleted modified-staged-deleted
__fish_git_files $kinds __fish_git_files $kinds
)' )'
complete -c git -n '__fish_git_using_command diff' -n '__fish_git_contains_opt cached staged' -fa '(__fish_git_files all-staged)' complete -c git -n '__fish_git_using_command diff' -n '__fish_git_contains_opt cached staged' -fa '(__fish_git_files all-staged)'
@@ -1439,11 +1439,11 @@ end
### difftool ### difftool
complete -c git -n __fish_git_needs_command -a difftool -d 'Open diffs in a visual tool' complete -c git -n __fish_git_needs_command -a difftool -d 'Open diffs in a visual tool'
complete -c git -n '__fish_git_using_command difftool' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_ranges)' complete -c git -n '__fish_git_using_command difftool' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_ranges)'
complete -c git -n '__fish_git_using_command difftool' -l cached -d 'Visually show diff of changes in the index' complete -c git -n '__fish_git_using_command difftool' -l cached -d 'Visually show diff of changes in the index'
complete -f -c git -n '__fish_git_using_command difftool' -a '( complete -f -c git -n '__fish_git_using_command difftool' -a '(
set -l kinds modified set -l kinds modified
contains -- -- (commandline -opc) && set -a kinds deleted modified-staged-deleted contains -- -- (commandline -xpc) && set -a kinds deleted modified-staged-deleted
__fish_git_files $kinds __fish_git_files $kinds
)' )'
complete -f -c git -n '__fish_git_using_command difftool' -s g -l gui -d 'Use `diff.guitool` instead of `diff.tool`' complete -f -c git -n '__fish_git_using_command difftool' -s g -l gui -d 'Use `diff.guitool` instead of `diff.tool`'
@@ -1508,7 +1508,7 @@ complete -f -c git -n '__fish_git_using_command grep' -l or -d 'Combine patterns
complete -f -c git -n '__fish_git_using_command grep' -l not -d 'Combine patterns using not' complete -f -c git -n '__fish_git_using_command grep' -l not -d 'Combine patterns using not'
complete -f -c git -n '__fish_git_using_command grep' -l all-match -d 'Only match files that can match all the pattern expressions when giving multiple' complete -f -c git -n '__fish_git_using_command grep' -l all-match -d 'Only match files that can match all the pattern expressions when giving multiple'
complete -f -c git -n '__fish_git_using_command grep' -s q -l quiet -d 'Just exit with status 0 when there is a match and with non-zero status when there isn\'t' complete -f -c git -n '__fish_git_using_command grep' -s q -l quiet -d 'Just exit with status 0 when there is a match and with non-zero status when there isn\'t'
complete -c git -n '__fish_git_using_command grep' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_refs)' complete -c git -n '__fish_git_using_command grep' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_refs)'
# TODO options, including max-depth, h, open-files-in-pager, contexts, threads, file # TODO options, including max-depth, h, open-files-in-pager, contexts, threads, file
### init ### init
@@ -1521,7 +1521,7 @@ complete -f -c git -n '__fish_git_using_command init' -l bare -d 'Create a bare
complete -c git -n __fish_git_needs_command -a shortlog -d 'Show commit shortlog' complete -c git -n __fish_git_needs_command -a shortlog -d 'Show commit shortlog'
complete -c git -n __fish_git_needs_command -a log -d 'Show commit logs' complete -c git -n __fish_git_needs_command -a log -d 'Show commit logs'
complete -c git -n '__fish_git_using_command log' -a '(__fish_git ls-files)' complete -c git -n '__fish_git_using_command log' -a '(__fish_git ls-files)'
complete -c git -n '__fish_git_using_command log' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_ranges)' complete -c git -n '__fish_git_using_command log' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_ranges)'
complete -c git -n '__fish_git_using_command log' -l follow -d 'Continue listing file history beyond renames' complete -c git -n '__fish_git_using_command log' -l follow -d 'Continue listing file history beyond renames'
complete -c git -n '__fish_git_using_command log' -l no-decorate -d 'Don\'t print ref names' complete -c git -n '__fish_git_using_command log' -l no-decorate -d 'Don\'t print ref names'
complete -f -c git -n '__fish_git_using_command log' -l decorate -a 'short\tHide\ prefixes full\tShow\ full\ ref\ names auto\tHide\ prefixes\ if\ printed\ to\ terminal no\tDon\\\'t\ display\ ref' -d 'Print out ref names' complete -f -c git -n '__fish_git_using_command log' -l decorate -a 'short\tHide\ prefixes full\tShow\ full\ ref\ names auto\tHide\ prefixes\ if\ printed\ to\ terminal no\tDon\\\'t\ display\ ref' -d 'Print out ref names'
@@ -1970,13 +1970,13 @@ complete -c git -n __fish_git_needs_command -a reset -d 'Reset current HEAD to t
complete -f -c git -n '__fish_git_using_command reset' -l hard -d 'Reset the index and the working tree' complete -f -c git -n '__fish_git_using_command reset' -l hard -d 'Reset the index and the working tree'
complete -f -c git -n '__fish_git_using_command reset' -l soft -d 'Reset head without touching the index or the working tree' complete -f -c git -n '__fish_git_using_command reset' -l soft -d 'Reset head without touching the index or the working tree'
complete -f -c git -n '__fish_git_using_command reset' -l mixed -d 'The default: reset the index but not the working tree' complete -f -c git -n '__fish_git_using_command reset' -l mixed -d 'The default: reset the index but not the working tree'
complete -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -ka '(__fish_git_branches)' complete -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -xpc)' -ka '(__fish_git_branches)'
# reset can either undo changes to versioned modified files, # reset can either undo changes to versioned modified files,
# or remove files from the staging area. # or remove files from the staging area.
# Deleted files seem to need a "--" separator. # Deleted files seem to need a "--" separator.
complete -f -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_files all-staged modified)' complete -f -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -xpc)' -a '(__fish_git_files all-staged modified)'
complete -f -c git -n '__fish_git_using_command reset' -n 'contains -- -- (commandline -opc)' -a '(__fish_git_files all-staged deleted modified)' complete -f -c git -n '__fish_git_using_command reset' -n 'contains -- -- (commandline -xpc)' -a '(__fish_git_files all-staged deleted modified)'
complete -f -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_reflog)' -d Reflog complete -f -c git -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -xpc)' -a '(__fish_git_reflog)' -d Reflog
# TODO options # TODO options
### restore and switch ### restore and switch
@@ -2075,7 +2075,7 @@ complete -f -c git -n '__fish_git_using_command stripspace' -s c -l comment-line
### tag ### tag
complete -f -c git -n __fish_git_needs_command -a tag -d 'Create, list, delete or verify a tag object signed with GPG' complete -f -c git -n __fish_git_needs_command -a tag -d 'Create, list, delete or verify a tag object signed with GPG'
complete -f -c git -n '__fish_git_using_command tag' -n '__fish_not_contain_opt -s d' -n '__fish_not_contain_opt -s v' -n 'test (count (commandline -opc | string match -r -v \'^-\')) -eq 3' -ka '(__fish_git_branches)' complete -f -c git -n '__fish_git_using_command tag' -n '__fish_not_contain_opt -s d' -n '__fish_not_contain_opt -s v' -n 'test (count (commandline -xpc | string match -r -v \'^-\')) -eq 3' -ka '(__fish_git_branches)'
complete -f -c git -n '__fish_git_using_command tag' -s a -l annotate -d 'Make an unsigned, annotated tag object' complete -f -c git -n '__fish_git_using_command tag' -s a -l annotate -d 'Make an unsigned, annotated tag object'
complete -f -c git -n '__fish_git_using_command tag' -s s -l sign -d 'Make a GPG-signed tag' complete -f -c git -n '__fish_git_using_command tag' -s s -l sign -d 'Make a GPG-signed tag'
complete -f -c git -n '__fish_git_using_command tag' -s d -l delete -d 'Remove a tag' complete -f -c git -n '__fish_git_using_command tag' -s d -l delete -d 'Remove a tag'
@@ -2252,11 +2252,11 @@ complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subco
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from add' -l force -d "Also add ignored submodule path" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from add' -l force -d "Also add ignored submodule path"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l force -d "Remove even with local changes" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l force -d "Remove even with local changes"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l all -d "Remove all submodules" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -l all -d "Remove all submodules"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_submodules)' -d Submodule complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from deinit' -n 'not contains -- -- (commandline -xpc)' -a '(__fish_git_submodules)' -d Submodule
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from set-branch' -s b -l branch -d "Specify the branch to use" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from set-branch' -s b -l branch -d "Specify the branch to use"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from set-branch' -s d -l default -d "Use default branch of the submodule" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from set-branch' -s d -l default -d "Use default branch of the submodule"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from status summary' -l cached -d "Use the commit stored in the index" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from status summary' -l cached -d "Use the commit stored in the index"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from status' -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_submodules)' -d Submodule complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from status' -n 'not contains -- -- (commandline -xpc)' -a '(__fish_git_submodules)' -d Submodule
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from summary' -l files -d "Compare the commit in the index with submodule HEAD" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from summary' -l files -d "Compare the commit in the index with submodule HEAD"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from foreach update status' -l recursive -d "Traverse submodules recursively" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from foreach update status' -l recursive -d "Traverse submodules recursively"
complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from foreach' -a "(__fish_complete_subcommand --fcs-skip=3)" complete -f -c git -n '__fish_git_using_command submodule' -n '__fish_seen_subcommand_from foreach' -a "(__fish_complete_subcommand --fcs-skip=3)"
@@ -2459,7 +2459,7 @@ complete -f -c git -n "__fish_seen_subcommand_from $sortcommands" -l sort -d 'So
complete -c git -n __fish_git_needs_command -a '(__fish_git_custom_commands)' -d 'Custom command' complete -c git -n __fish_git_needs_command -a '(__fish_git_custom_commands)' -d 'Custom command'
function __fish_git_complete_custom_command -a subcommand function __fish_git_complete_custom_command -a subcommand
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -e cmd[1] # Drop "git". set -e cmd[1] # Drop "git".
set -lx subcommand_args set -lx subcommand_args
if argparse -s (__fish_git_global_optspecs) -- $cmd if argparse -s (__fish_git_global_optspecs) -- $cmd

View File

@@ -2,25 +2,25 @@
source $__fish_data_dir/completions/git.fish source $__fish_data_dir/completions/git.fish
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l all -d 'Show all refs (branches, tags, etc.)' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l all -d 'Show all refs (branches, tags, etc.)'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l since=YYYY-MM-DD -x -d 'Show commits more recent that a specific date' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l since=YYYY-MM-DD -x -d 'Show commits more recent that a specific date'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l until=YYYY-MM-DD -x -d 'Show commits older than a specific date' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l until=YYYY-MM-DD -x -d 'Show commits older than a specific date'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l date-order -d 'Sort commits by date when possible' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l date-order -d 'Sort commits by date when possible'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l merge -d 'On a merge conflict, show commits that modify conflicting files' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l merge -d 'On a merge conflict, show commits that modify conflicting files'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l left-right -d 'Mark which side of a symmetric difference a commit is reachable from' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l left-right -d 'Mark which side of a symmetric difference a commit is reachable from'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l full-history -d 'When filtering history with -- path..., do not prune some history' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l full-history -d 'When filtering history with -- path..., do not prune some history'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l simplify-merges -d 'Hide needless merges from history' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l simplify-merges -d 'Hide needless merges from history'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l ancestry-path -d 'Only display commits that exist directly on the ancestry chain between the range' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l ancestry-path -d 'Only display commits that exist directly on the ancestry chain between the range'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l argscmd= -d 'Command to be run to determine th revision range to show' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l argscmd= -d 'Command to be run to determine th revision range to show'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l select-commit= -d 'Select the specified commit after loading the graph, instead of HEAD' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l select-commit= -d 'Select the specified commit after loading the graph, instead of HEAD'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -l select-commit=HEAD -d 'Select the specified commit after loading the graph, instead of HEAD' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -l select-commit=HEAD -d 'Select the specified commit after loading the graph, instead of HEAD'
complete -c gitk -n 'not contains -- -- (commandline -opc) && string match -rq -- "^--select-commit=" (commandline -ct)' -xa '(printf -- "--select-commit=%s\n" (__fish_git_refs))' complete -c gitk -n 'not contains -- -- (commandline -xpc) && string match -rq -- "^--select-commit=" (commandline -ct)' -xa '(printf -- "--select-commit=%s\n" (__fish_git_refs))'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -s n -l max-count -x -d 'Limit the number of commits to output' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -s n -l max-count -x -d 'Limit the number of commits to output'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -xa -L1 -d '-L<start>,<end>:<file> trace the evolution of a line range' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -xa -L1 -d '-L<start>,<end>:<file> trace the evolution of a line range'
complete -c gitk -n 'not contains -- -- (commandline -opc)' -xa -L. -d '-L<funcname>:<file> trace the evolution of a function name regex' complete -c gitk -n 'not contains -- -- (commandline -xpc)' -xa -L. -d '-L<funcname>:<file> trace the evolution of a function name regex'
complete -c gitk -n 'not contains -- -- (commandline -opc) && string match -rq -- "^-L[^:]*": (commandline -ct)' -xa '( complete -c gitk -n 'not contains -- -- (commandline -xpc) && string match -rq -- "^-L[^:]*": (commandline -ct)' -xa '(
set -l tok (string split -m 1 -- : (commandline -ct)) set -l tok (string split -m 1 -- : (commandline -ct))
printf -- "$tok[1]:%s\n" (complete -C"__fish_command_without_completions $tok[2]") printf -- "$tok[1]:%s\n" (complete -C"__fish_command_without_completions $tok[2]")
)' )'
complete -c gitk -f -n 'not contains -- -- (commandline -opc)' -a '(__fish_git_ranges)' complete -c gitk -f -n 'not contains -- -- (commandline -xpc)' -a '(__fish_git_ranges)'
complete -c gitk -F -n 'contains -- -- (commandline -opc)' complete -c gitk -F -n 'contains -- -- (commandline -xpc)'

View File

@@ -5,7 +5,7 @@ function __fish_complete_gsettings_args
set -l key_commands get monitor writable range describe set reset set -l key_commands get monitor writable range describe set reset
set -l schemadir set -l schemadir
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
set -e cmd[1] set -e cmd[1]
if set -q cmd[2] if set -q cmd[2]

View File

@@ -30,7 +30,7 @@ function __fish_list_heroku_releases
end end
function __fish_heroku_needs_command function __fish_heroku_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end
@@ -38,7 +38,7 @@ function __fish_heroku_needs_command
end end
function __fish_heroku_using_command function __fish_heroku_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -342,7 +342,7 @@ function __fish_hg_mq_enabled
end end
function __fish_hg_get_command function __fish_hg_get_command
set -l cmdline (commandline -poc) set -l cmdline (commandline -pxc)
set -e cmdline[1] set -e cmdline[1]
set -l lasttoken "" set -l lasttoken ""
for token in $cmdline for token in $cmdline

View File

@@ -6,7 +6,7 @@ function __homectl_users
end end
function __homectl_subcommand_is function __homectl_subcommand_is
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
contains -- $cmd[-1] $argv contains -- $cmd[-1] $argv
end end

View File

@@ -3,7 +3,7 @@
# Functions # Functions
function __fish_hugo_command function __fish_hugo_command
set -l tokens (commandline -opc) set -l tokens (commandline -xpc)
test (count $tokens) -le 1; and return 1 test (count $tokens) -le 1; and return 1
set -l command "" set -l command ""
set -l skip 1 set -l skip 1

View File

@@ -1 +1 @@
complete -c ibmcloud -f -a '(__fish_argcomplete_complete (commandline -opc) --generate-bash-completion)' complete -c ibmcloud -f -a '(__fish_argcomplete_complete (commandline -xpc) --generate-bash-completion)'

View File

@@ -3,7 +3,7 @@ function __fish_print_debian_services --description 'Prints services installed'
end end
function __fish_invoke_rcd_has_service function __fish_invoke_rcd_has_service
set -l tokens (commandline -opc) set -l tokens (commandline -xpc)
if test (count $tokens) -eq 2 if test (count $tokens) -eq 2
return 0 return 0
else else

View File

@@ -13,7 +13,7 @@ set -l ip_all_commands $ip_commands $ip_addr $ip_link $ip_neigh $ip_route
function __fish_ip_commandwords function __fish_ip_commandwords
set -l skip 0 set -l skip 0
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
# Remove the first word because it's "ip" or an alias for it # Remove the first word because it's "ip" or an alias for it
set -e cmd[1] set -e cmd[1]
set -l have_command 0 set -l have_command 0

View File

@@ -2,7 +2,7 @@ set -l __fish_iptables_tables filter nat mangle raw security
function __fish_iptables_current_table function __fish_iptables_current_table
set -l next_is_table 1 set -l next_is_table 1
for token in (commandline -oc) for token in (commandline -xc)
switch $token switch $token
case "--table=*" case "--table=*"
echo (string split -m1 = -- $token)[2] echo (string split -m1 = -- $token)[2]
@@ -79,7 +79,7 @@ end
function __fish_iptables_has_chain function __fish_iptables_has_chain
# Remove descriptions # Remove descriptions
set -l chains (__fish_iptables_chains | string split -m1 " " | while read -l a b; echo $a; end) set -l chains (__fish_iptables_chains | string split -m1 " " | while read -l a b; echo $a; end)
set -l cmdline (commandline -op) set -l cmdline (commandline -xp)
for c in $chains for c in $chains
if contains -- $c $cmdline if contains -- $c $cmdline
return 0 return 0

View File

@@ -21,7 +21,7 @@ function __fish_iw_ssid
end end
function __fish_complete_iw function __fish_complete_iw
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if string match --quiet -- '-*' $cmd[2] if string match --quiet -- '-*' $cmd[2]
set -e cmd[2] # Allow other completions to complete as normal set -e cmd[2] # Allow other completions to complete as normal

View File

@@ -37,7 +37,7 @@ end
function __iwctl_match_subcoms function __iwctl_match_subcoms
set -l match (string split --no-empty " " -- $argv) set -l match (string split --no-empty " " -- $argv)
set argv (commandline -poc) set argv (commandline -pxc)
# iwctl allows to specify arguments for username, password, passphrase and dont-ask regardless of any following commands # iwctl allows to specify arguments for username, password, passphrase and dont-ask regardless of any following commands
argparse -i 'u/username=' 'p/password=' 'P/passphrase=' v/dont-ask -- $argv argparse -i 'u/username=' 'p/password=' 'P/passphrase=' v/dont-ask -- $argv
set argv $argv[2..] set argv $argv[2..]
@@ -54,7 +54,7 @@ function __iwctl_match_subcoms
end end
function __iwctl_connect function __iwctl_connect
set argv (commandline -poc) set argv (commandline -pxc)
# remove all options # remove all options
argparse -i 'u/username=' 'p/password=' 'P/passphrase=' v/dont-ask -- $argv argparse -i 'u/username=' 'p/password=' 'P/passphrase=' v/dont-ask -- $argv
# station name should now be the third argument (`iwctl station <wlan>`) # station name should now be the third argument (`iwctl station <wlan>`)

View File

@@ -3,7 +3,7 @@ function __history_completions --argument-names limit
set limit 25 set limit 25
end end
set -l tokens (commandline --current-process --tokenize) set -l tokens (commandline --current-process --expand-tokens)
history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | head -n$limit history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | head -n$limit
end end

View File

@@ -2,7 +2,7 @@
# Check if command already given # Check if command already given
function __fish_prog_needs_command function __fish_prog_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
echo $cmd echo $cmd
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0

View File

@@ -1,5 +1,5 @@
function __fish_k3d_no_subcommand --description 'Test if k3d has yet to be given subcommands' function __fish_k3d_no_subcommand --description 'Test if k3d has yet to be given subcommands'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i cluster image kubeconfig node version if contains -- $i cluster image kubeconfig node version
return 1 return 1
end end

View File

@@ -1,7 +1,7 @@
#Keybase 5.6.1 #Keybase 5.6.1
function __fish_keybase_line_ends_with function __fish_keybase_line_ends_with
set -l line (commandline -poc | string match -v -r '^-') set -l line (commandline -pxc | string match -v -r '^-')
for i in (seq -1 -1 -(count $argv)) for i in (seq -1 -1 -(count $argv))
if test "$line[$i]" != "$argv[$i]" if test "$line[$i]" != "$argv[$i]"
return 1 return 1

View File

@@ -1,12 +1,12 @@
# Fish Shell command-line completions for Test Kitchen # Fish Shell command-line completions for Test Kitchen
function __fish_kitchen_no_command -d 'Test if kitchen has yet to be given the main command' function __fish_kitchen_no_command -d 'Test if kitchen has yet to be given the main command'
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
test (count $cmd) -eq 1 test (count $cmd) -eq 1
end end
function __fish_kitchen_using_command function __fish_kitchen_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -q cmd[2]; and test "$argv[1]" = $cmd[2] set -q cmd[2]; and test "$argv[1]" = $cmd[2]
end end

View File

@@ -1,5 +1,5 @@
function __krita_complete_image_format function __krita_complete_image_format
set -l previous_token (commandline -oc)[-1] set -l previous_token (commandline -xc)[-1]
set -l current_token (commandline -t) set -l current_token (commandline -t)
if test "$previous_token" = --new-image if test "$previous_token" = --new-image

View File

@@ -1,5 +1,5 @@
function __fish_lein_needs_command function __fish_lein_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end

View File

@@ -9,7 +9,7 @@ set -l localevars LANG LC_MESSAGES LC_{CTYPE,NUMERIC,TIME,COLLATE,MONETARY,MESSA
set -l locales $localevars=(localectl list-locales 2>/dev/null) set -l locales $localevars=(localectl list-locales 2>/dev/null)
function __fish_localectl_layout function __fish_localectl_layout
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
set -e cmd[1] set -e cmd[1]
set -e cmd[1] set -e cmd[1]
for l in (localectl list-x11-keymap-layouts) for l in (localectl list-x11-keymap-layouts)

View File

@@ -1,5 +1,5 @@
function __fish_lunchy_needs_command function __fish_lunchy_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
@@ -9,7 +9,7 @@ function __fish_lunchy_needs_command
end end
function __fish_lunchy_using_command function __fish_lunchy_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -l cmd_count (count $cmd) set -l cmd_count (count $cmd)
if test $cmd_count -lt 2 if test $cmd_count -lt 2

View File

@@ -1,5 +1,5 @@
function __fish_lxc_no_subcommand -d 'Test if lxc has yet to be given the command' function __fish_lxc_no_subcommand -d 'Test if lxc has yet to be given the command'
for i in (commandline --tokenize --cut-at-cursor --current-process) for i in (commandline --expand-tokens --cut-at-cursor --current-process)
if contains -- $i config console copy delete exec file help image info launch list move network pause profile publish remote rename restart restore shell snapshot start stop if contains -- $i config console copy delete exec file help image info launch list move network pause profile publish remote rename restart restore shell snapshot start stop
return 1 return 1
end end

View File

@@ -8,7 +8,7 @@ function __fish_systemd_has_machine_image
set -l images (__fish_systemd_machine_images) set -l images (__fish_systemd_machine_images)
for i in $images ".host" for i in $images ".host"
# Include ".host" here because it _is_ a valid machine # Include ".host" here because it _is_ a valid machine
if contains -- $i (commandline -opc) if contains -- $i (commandline -xpc)
echo $i echo $i
return 0 return 0
end end
@@ -19,7 +19,7 @@ end
function __fish_systemd_has_machine function __fish_systemd_has_machine
set -l cmd set -l cmd
if not count $argv >/dev/null if not count $argv >/dev/null
set cmd (commandline -opc) set cmd (commandline -xpc)
else else
set cmd $argv set cmd $argv
end end
@@ -120,7 +120,7 @@ complete -f -c machinectl -n "__fish_seen_subcommand_from login bind copy-to cop
complete -f -c machinectl -n "__fish_seen_subcommand_from login bind copy-to copy-from shell; and not __fish_systemd_has_machine" -a "(__fish_systemd_machines)" complete -f -c machinectl -n "__fish_seen_subcommand_from login bind copy-to copy-from shell; and not __fish_systemd_has_machine" -a "(__fish_systemd_machines)"
# This is imperfect as we print the _local_ users # This is imperfect as we print the _local_ users
complete -f -c machinectl -n "__fish_seen_subcommand_from shell; and not __fish_systemd_has_machine (commandline -opc | cut -d"@" -f2-)" -a "(__fish_print_users)@(__fish_systemd_machines)" complete -f -c machinectl -n "__fish_seen_subcommand_from shell; and not __fish_systemd_has_machine (commandline -xpc | cut -d"@" -f2-)" -a "(__fish_print_users)@(__fish_systemd_machines)"
complete -f -c machinectl -n "__fish_seen_subcommand_from read-only; and not __fish_systemd_has_machine_image" -a "(__fish_systemd_machine_images)" complete -f -c machinectl -n "__fish_seen_subcommand_from read-only; and not __fish_systemd_has_machine_image" -a "(__fish_systemd_machine_images)"
complete -f -c machinectl -n "__fish_seen_subcommand_from read-only; and __fish_systemd_has_machine_image" -a "yes no" complete -f -c machinectl -n "__fish_seen_subcommand_from read-only; and __fish_systemd_has_machine_image" -a "yes no"

View File

@@ -202,7 +202,7 @@ end
######################################################### #########################################################
function __fish_magento_not_in_command -d "Checks that prompt is not inside of magento command" function __fish_magento_not_in_command -d "Checks that prompt is not inside of magento command"
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
for i in $cmd for i in $cmd
if contains -- $i (__fish_print_magento_commands_list) if contains -- $i (__fish_print_magento_commands_list)
return 1 return 1
@@ -219,7 +219,7 @@ end
# in the arguments, even though if more than a single command is specified, # in the arguments, even though if more than a single command is specified,
# p4 will complain. # p4 will complain.
function __fish_magento_is_using_command -d "Checks if prompt is in a specific command" function __fish_magento_is_using_command -d "Checks if prompt is in a specific command"
if contains -- $argv[1] (commandline -opc) if contains -- $argv[1] (commandline -xpc)
return 0 return 0
end end
return 1 return 1

View File

@@ -1,7 +1,7 @@
# Completions for the meson build system (http://mesonbuild.com/) # Completions for the meson build system (http://mesonbuild.com/)
function __fish_meson_needs_command function __fish_meson_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -e cmd[1] set -e cmd[1]
argparse -s v/version -- $cmd 2>/dev/null argparse -s v/version -- $cmd 2>/dev/null
or return 0 or return 0
@@ -9,7 +9,7 @@ function __fish_meson_needs_command
end end
function __fish_meson_using_command function __fish_meson_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -e cmd[1] set -e cmd[1]
test (count $cmd) -eq 0 test (count $cmd) -eq 0
and return 1 and return 1
@@ -19,7 +19,7 @@ end
function __fish_meson_builddir function __fish_meson_builddir
# Consider the value of -C option to detect the build directory # Consider the value of -C option to detect the build directory
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
argparse -i 'C=' -- $cmd argparse -i 'C=' -- $cmd
if set -q _flag_C if set -q _flag_C
echo $_flag_C echo $_flag_C

View File

@@ -5,7 +5,7 @@
# See: https://github.com/kubernetes/minikube # See: https://github.com/kubernetes/minikube
function __minikube_no_command function __minikube_no_command
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
if not set -q cmd[2] if not set -q cmd[2]
return 0 return 0
end end
@@ -13,7 +13,7 @@ function __minikube_no_command
end end
function __minikube_using_command function __minikube_using_command
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
if test (count $cmd) -gt (count $argv) if test (count $cmd) -gt (count $argv)
set -e cmd[1] set -e cmd[1]
@@ -25,7 +25,7 @@ function __minikube_using_command
end end
function __minikube_using_option function __minikube_using_option
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
set -l query "("(string join -- "|" (string escape --style=regex $argv))")" set -l query "("(string join -- "|" (string escape --style=regex $argv))")"
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
@@ -37,7 +37,7 @@ function __minikube_using_option
end end
function __minikube_using_option_value -a option -a value function __minikube_using_option_value -a option -a value
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
string match -qr -- (string escape --style=regex $option)"[= ]"(string escape --style=regex $value) "$cmd" string match -qr -- (string escape --style=regex $option)"[= ]"(string escape --style=regex $value) "$cmd"

View File

@@ -1,7 +1,7 @@
# Completions for the Elixir build tool mix # Completions for the Elixir build tool mix
function __fish_mix_needs_command function __fish_mix_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end
@@ -9,7 +9,7 @@ function __fish_mix_needs_command
end end
function __fish_mix_using_command function __fish_mix_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -7,32 +7,32 @@ complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mk
## build ## build
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a build -d 'Build the MkDocs documentation' complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a build -d 'Build the MkDocs documentation'
complete -n 'contains build (commandline -poc)' -f -c mkdocs -s c -l clean -d 'Remove old site_dir before building (the default)' complete -n 'contains build (commandline -pxc)' -f -c mkdocs -s c -l clean -d 'Remove old site_dir before building (the default)'
complete -n 'contains build (commandline -poc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config' complete -n 'contains build (commandline -pxc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config'
complete -n 'contains build (commandline -poc)' -f -c mkdocs -s s -l strict -d 'Enable strict mode. This will cause MkDocs to abort the build on any warnings' complete -n 'contains build (commandline -pxc)' -f -c mkdocs -s s -l strict -d 'Enable strict mode. This will cause MkDocs to abort the build on any warnings'
complete -n 'contains build (commandline -poc)' -c mkdocs -s t -l theme -d 'The theme to use when building your documentation' -xa 'mkdocs readthedocs material' complete -n 'contains build (commandline -pxc)' -c mkdocs -s t -l theme -d 'The theme to use when building your documentation' -xa 'mkdocs readthedocs material'
complete -n 'contains build (commandline -poc)' -c mkdocs -s e -l theme-dir -r -d 'The theme directory to use when building your documentation' complete -n 'contains build (commandline -pxc)' -c mkdocs -s e -l theme-dir -r -d 'The theme directory to use when building your documentation'
complete -n 'contains build (commandline -poc)' -c mkdocs -s d -l site-dir -r -d 'The directory to output the result of the documentation build' complete -n 'contains build (commandline -pxc)' -c mkdocs -s d -l site-dir -r -d 'The directory to output the result of the documentation build'
## gh-deploy ## gh-deploy
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a gh-deploy -d 'Deploy your documentation to GitHub Pages' complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a gh-deploy -d 'Deploy your documentation to GitHub Pages'
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s c -l clean -d 'Remove old site_dir before building (the default)' complete -n 'contains gh-deploy (commandline -pxc)' -f -c mkdocs -s c -l clean -d 'Remove old site_dir before building (the default)'
complete -n 'contains gh-deploy (commandline -poc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config' complete -n 'contains gh-deploy (commandline -pxc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config'
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s m -l message -r -d 'A commit message to use when committing to the GitHub Pages remote branch' complete -n 'contains gh-deploy (commandline -pxc)' -f -c mkdocs -s m -l message -r -d 'A commit message to use when committing to the GitHub Pages remote branch'
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s b -l remote-branch -r -d 'The remote branch to commit to for GitHub Pages' complete -n 'contains gh-deploy (commandline -pxc)' -f -c mkdocs -s b -l remote-branch -r -d 'The remote branch to commit to for GitHub Pages'
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -s r -l remote-name -r -d 'The remote name to commit to for GitHub Pages' complete -n 'contains gh-deploy (commandline -pxc)' -f -c mkdocs -s r -l remote-name -r -d 'The remote name to commit to for GitHub Pages'
complete -n 'contains gh-deploy (commandline -poc)' -f -c mkdocs -l force -d 'Force the push to the repository' complete -n 'contains gh-deploy (commandline -pxc)' -f -c mkdocs -l force -d 'Force the push to the repository'
## new ## new
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a new -r -d 'Create a new MkDocs project' complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a new -r -d 'Create a new MkDocs project'
## serve ## serve
complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a serve -d 'Run the builtin development server' complete -n 'not __fish_seen_subcommand_from build gh-deploy new serve' -f -c mkdocs -a serve -d 'Run the builtin development server'
complete -n 'contains serve (commandline -poc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config' complete -n 'contains serve (commandline -pxc)' -c mkdocs -s f -l config-file -r -d 'Provide a specific MkDocs config'
complete -n 'contains serve (commandline -poc)' -c mkdocs -s a -l dev-addr -r -d 'IP address and port to serve documentation locally (default: localhost:8000)' complete -n 'contains serve (commandline -pxc)' -c mkdocs -s a -l dev-addr -r -d 'IP address and port to serve documentation locally (default: localhost:8000)'
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -s s -l strict -d 'Enable strict mode. This will cause MkDocs to abort the build on any warnings' complete -n 'contains serve (commandline -pxc)' -f -c mkdocs -s s -l strict -d 'Enable strict mode. This will cause MkDocs to abort the build on any warnings'
complete -n 'contains serve (commandline -poc)' -c mkdocs -s t -l theme -d 'The theme to use when building your documentation' -xa 'mkdocs readthedocs material' complete -n 'contains serve (commandline -pxc)' -c mkdocs -s t -l theme -d 'The theme to use when building your documentation' -xa 'mkdocs readthedocs material'
complete -n 'contains serve (commandline -poc)' -c mkdocs -s e -l theme-dir -r -d 'The theme directory to use when building your documentation' complete -n 'contains serve (commandline -pxc)' -c mkdocs -s e -l theme-dir -r -d 'The theme directory to use when building your documentation'
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -l livereload -d 'Enable the live reloading in the development server (this is the default)' complete -n 'contains serve (commandline -pxc)' -f -c mkdocs -l livereload -d 'Enable the live reloading in the development server (this is the default)'
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -l no-livereload -d 'Disable the live reloading in the development server' complete -n 'contains serve (commandline -pxc)' -f -c mkdocs -l no-livereload -d 'Disable the live reloading in the development server'
complete -n 'contains serve (commandline -poc)' -f -c mkdocs -l dirtyreload -d 'Enable the live reloading in the development server, but only re-build files that have changed' complete -n 'contains serve (commandline -pxc)' -f -c mkdocs -l dirtyreload -d 'Enable the live reloading in the development server, but only re-build files that have changed'

View File

@@ -8,7 +8,7 @@
# Chapters: 7 entries # Chapters: 7 entries
function __fish_mkvextract_get_mode function __fish_mkvextract_get_mode
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
set -l skip_next 0 set -l skip_next 0
for c in $cmd[2..-1] for c in $cmd[2..-1]
test $skip_next = 1; and set skip_next 0; and continue test $skip_next = 1; and set skip_next 0; and continue
@@ -29,7 +29,7 @@ function __fish_mkvextract_get_mode
end end
function __fish_mkvextract_get_file function __fish_mkvextract_get_file
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
# Any invocation with a file specified will already have >= 2 args # Any invocation with a file specified will already have >= 2 args
if not set -q cmd[3] if not set -q cmd[3]
return 1 return 1

View File

@@ -37,7 +37,7 @@ complete -c mvn -f -o cpu -l check-plugin-updates -d "Ineffective, only kept for
function __fish_mvn_complete_definition function __fish_mvn_complete_definition
set -l current_token (commandline -t) set -l current_token (commandline -t)
set -l previous_token (commandline -opc)[-1] set -l previous_token (commandline -xpc)[-1]
string match -qr -- '^(-D|--define\b)' $current_token $previous_token string match -qr -- '^(-D|--define\b)' $current_token $previous_token
or return or return
set -l keyval (string split --max=1 -- = $current_token) set -l keyval (string split --max=1 -- = $current_token)

View File

@@ -1,7 +1,7 @@
function __fish_ninja function __fish_ninja
set -l saved_args $argv set -l saved_args $argv
set -l dir . set -l dir .
if argparse -i C/dir= -- (commandline -opc) if argparse -i C/dir= -- (commandline -xpc)
command ninja -C$_flag_C $saved_args command ninja -C$_flag_C $saved_args
end end
end end

View File

@@ -34,64 +34,64 @@ complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_s
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa permissions -d 'Show caller permissions for authenticated operations' complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa permissions -d 'Show caller permissions for authenticated operations'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa logging -d 'Get or change NetworkManager logging level and domains' complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa logging -d 'Get or change NetworkManager logging level and domains'
complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa help complete -c nmcli -n "__fish_seen_subcommand_from general; and not __fish_seen_subcommand_from $nmcli_general" -xa help
complete -c nmcli -n "contains_seq general logging -- (commandline -op)" -xa 'level domains help' complete -c nmcli -n "contains_seq general logging -- (commandline -xp)" -xa 'level domains help'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa on -d 'Switch networking on' complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa on -d 'Switch networking on'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa off -d 'Switch networking off' complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa off -d 'Switch networking off'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa connectivity -d 'Get network connectivity state' complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa connectivity -d 'Get network connectivity state'
complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa help complete -c nmcli -n "__fish_seen_subcommand_from networking; and not __fish_seen_subcommand_from $nmcli_networking" -xa help
complete -c nmcli -n "contains_seq networking connectivity -- (commandline -op)" -xa check -d 'Re-check the connectivity' complete -c nmcli -n "contains_seq networking connectivity -- (commandline -xp)" -xa check -d 'Re-check the connectivity'
complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa all -d 'Get status of all radio switches; turn them on/off' complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa all -d 'Get status of all radio switches; turn them on/off'
complete -c nmcli -n "contains_seq radio all -- (commandline -op)" -xa 'on off help' complete -c nmcli -n "contains_seq radio all -- (commandline -xp)" -xa 'on off help'
complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa wifi -d 'Get status of Wi-Fi radio switch; turn it on/off' complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa wifi -d 'Get status of Wi-Fi radio switch; turn it on/off'
complete -c nmcli -n "contains_seq radio wifi -- (commandline -op)" -xa 'on off help' complete -c nmcli -n "contains_seq radio wifi -- (commandline -xp)" -xa 'on off help'
complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa wwan -d 'Get status of mobile broadband radio switch; turn it on/off' complete -c nmcli -n "__fish_seen_subcommand_from radio; and not __fish_seen_subcommand_from $nmcli_radio" -xa wwan -d 'Get status of mobile broadband radio switch; turn it on/off'
complete -c nmcli -n "contains_seq radio wwan -- (commandline -op)" -xa 'on off help' complete -c nmcli -n "contains_seq radio wwan -- (commandline -xp)" -xa 'on off help'
complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa "$nmcli_connection" complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa "$nmcli_connection"
# Connection subcommands are self-explanatory, I'm just highlighting a difference between edit and modify # Connection subcommands are self-explanatory, I'm just highlighting a difference between edit and modify
complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa modify -d "Modify one or more properties" complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa modify -d "Modify one or more properties"
complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa edit -d "Interactive edit" complete -c nmcli -n "__fish_seen_subcommand_from connection; and not __fish_seen_subcommand_from $nmcli_connection" -xa edit -d "Interactive edit"
complete -c nmcli -n "contains_seq connection show -- (commandline -op)" -l active -d 'List only active profiles' complete -c nmcli -n "contains_seq connection show -- (commandline -xp)" -l active -d 'List only active profiles'
complete -c nmcli -n "contains_seq connection show -- (commandline -op)" -l order -d 'Custom connection ordering' complete -c nmcli -n "contains_seq connection show -- (commandline -xp)" -l order -d 'Custom connection ordering'
complete -c nmcli -n "contains_seq connection show -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection show -- (commandline -xp)" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection up -- (commandline -op) && not contains -- (commandline -op)[-1] ifname ap" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection up -- (commandline -xp) && not contains -- (commandline -xp)[-1] ifname ap" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection up -- (commandline -op) && test (commandline -op)[-1] = ifname" -xa "$ifname" -k complete -c nmcli -n "contains_seq connection up -- (commandline -xp) && test (commandline -xp)[-1] = ifname" -xa "$ifname" -k
complete -c nmcli -n "contains_seq connection up -- (commandline -op) && test (commandline -op)[-1] = ap" -xa "$bssid" complete -c nmcli -n "contains_seq connection up -- (commandline -xp) && test (commandline -xp)[-1] = ap" -xa "$bssid"
complete -c nmcli -n "contains_seq connection up -- (commandline -op)" -xa nsp -d 'Specify NSP to connect to (only for WiMAX)' complete -c nmcli -n "contains_seq connection up -- (commandline -xp)" -xa nsp -d 'Specify NSP to connect to (only for WiMAX)'
complete -c nmcli -n "contains_seq connection up -- (commandline -op)" -xa passwd-file -d 'password file to activate the connection' complete -c nmcli -n "contains_seq connection up -- (commandline -xp)" -xa passwd-file -d 'password file to activate the connection'
complete -c nmcli -n "contains_seq connection down -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection down -- (commandline -xp)" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection add -- (commandline -op)" -xa 'type ifname con-name autoconnect save master slave-type help' complete -c nmcli -n "contains_seq connection add -- (commandline -xp)" -xa 'type ifname con-name autoconnect save master slave-type help'
complete -c nmcli -n "contains_seq connection add -- (commandline -op) && test (commandline -op)[-1] = ifname" -xa "$ifname" complete -c nmcli -n "contains_seq connection add -- (commandline -xp) && test (commandline -xp)[-1] = ifname" -xa "$ifname"
complete -c nmcli -n "contains_seq connection modify -- (commandline -op)" -l temporary complete -c nmcli -n "contains_seq connection modify -- (commandline -xp)" -l temporary
complete -c nmcli -n "contains_seq connection modify -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection modify -- (commandline -xp)" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection clone -- (commandline -op)" -l temporary complete -c nmcli -n "contains_seq connection clone -- (commandline -xp)" -l temporary
complete -c nmcli -n "contains_seq connection clone -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection clone -- (commandline -xp)" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection edit -- (commandline -op)" -xa "type help $cname" -k complete -c nmcli -n "contains_seq connection edit -- (commandline -xp)" -xa "type help $cname" -k
complete -c nmcli -n "contains_seq connection edit type -- (commandline -op)" -xa con-name complete -c nmcli -n "contains_seq connection edit type -- (commandline -xp)" -xa con-name
complete -c nmcli -n "contains_seq connection delete -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection delete -- (commandline -xp)" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection monitor -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection monitor -- (commandline -xp)" -xa "help $cname" -k
complete -c nmcli -n "contains_seq connection import -- (commandline -op)" -l temporary complete -c nmcli -n "contains_seq connection import -- (commandline -xp)" -l temporary
complete -c nmcli -n "contains_seq connection import -- (commandline -op)" -xa 'type file help' complete -c nmcli -n "contains_seq connection import -- (commandline -xp)" -xa 'type file help'
complete -c nmcli -n "contains_seq connection export -- (commandline -op)" -xa "help $cname" -k complete -c nmcli -n "contains_seq connection export -- (commandline -xp)" -xa "help $cname" -k
set -l wifi_commands list connect hotspot rescan help set -l wifi_commands list connect hotspot rescan help
complete -c nmcli -n "__fish_seen_subcommand_from device; and not __fish_seen_subcommand_from $nmcli_device" -xa "$nmcli_device" complete -c nmcli -n "__fish_seen_subcommand_from device; and not __fish_seen_subcommand_from $nmcli_device" -xa "$nmcli_device"
complete -c nmcli -n "contains_seq device set -- (commandline -op)" -xa 'ifname autoconnect managed' complete -c nmcli -n "contains_seq device set -- (commandline -xp)" -xa 'ifname autoconnect managed'
complete -c nmcli -n "contains_seq device wifi -- (commandline -op); and not __fish_seen_subcommand_from $wifi_commands" -xa "$wifi_commands" complete -c nmcli -n "contains_seq device wifi -- (commandline -xp); and not __fish_seen_subcommand_from $wifi_commands" -xa "$wifi_commands"
complete -c nmcli -n "contains_seq device wifi list -- (commandline -op)" -xa 'ifname bssid' complete -c nmcli -n "contains_seq device wifi list -- (commandline -xp)" -xa 'ifname bssid'
complete -c nmcli -n "contains_seq device wifi list ifname -- (commandline -op)" -xa "$ifname" complete -c nmcli -n "contains_seq device wifi list ifname -- (commandline -xp)" -xa "$ifname"
complete -c nmcli -n "contains_seq device wifi list bssid -- (commandline -op)" -xa "$bssid" complete -c nmcli -n "contains_seq device wifi list bssid -- (commandline -xp)" -xa "$bssid"
complete -c nmcli -n "contains_seq device wifi connect -- (commandline -op)" -xa "$ssid $bssid password wep-key-type ifname bssid name private hidden" -k complete -c nmcli -n "contains_seq device wifi connect -- (commandline -xp)" -xa "$ssid $bssid password wep-key-type ifname bssid name private hidden" -k
complete -c nmcli -n "contains_seq device wifi connect ifname -- (commandline -op)" -xa "$ifname" complete -c nmcli -n "contains_seq device wifi connect ifname -- (commandline -xp)" -xa "$ifname"
complete -c nmcli -n "contains_seq device wifi connect bssid -- (commandline -op)" -xa "$bssid" complete -c nmcli -n "contains_seq device wifi connect bssid -- (commandline -xp)" -xa "$bssid"
complete -c nmcli -n "contains_seq device wifi hotspot -- (commandline -op)" -xa 'ifname con-name ssid band channel password' complete -c nmcli -n "contains_seq device wifi hotspot -- (commandline -xp)" -xa 'ifname con-name ssid band channel password'
complete -c nmcli -n "contains_seq device wifi hotspot ifname -- (commandline -op)" -xa "$ifname" complete -c nmcli -n "contains_seq device wifi hotspot ifname -- (commandline -xp)" -xa "$ifname"
complete -c nmcli -n "contains_seq device wifi rescan -- (commandline -op)" -xa 'ifname ssid' complete -c nmcli -n "contains_seq device wifi rescan -- (commandline -xp)" -xa 'ifname ssid'
complete -c nmcli -n "contains_seq device wifi rescan ifname -- (commandline -op)" -xa "$ifname" complete -c nmcli -n "contains_seq device wifi rescan ifname -- (commandline -xp)" -xa "$ifname"
complete -c nmcli -n "contains_seq device wifi rescan ssid -- (commandline -op)" -xa "$ssid" complete -c nmcli -n "contains_seq device wifi rescan ssid -- (commandline -xp)" -xa "$ssid"
complete -c nmcli -n "contains_seq device lldp -- (commandline -op)" -xa list complete -c nmcli -n "contains_seq device lldp -- (commandline -xp)" -xa list
complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa secret -d "Register nmcli as NM secret agent" complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa secret -d "Register nmcli as NM secret agent"
complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa polkit -d "Register nmcli as a polkit agent for user session" complete -c nmcli -n "__fish_seen_subcommand_from agent; and not __fish_seen_subcommand_from $nmcli_agent" -xa polkit -d "Register nmcli as a polkit agent for user session"

View File

@@ -8,7 +8,7 @@ source $__fish_data_dir/functions/__fish_npm_helper.fish
set -l npm_install "npm install --global" set -l npm_install "npm install --global"
function __fish_npm_needs_command function __fish_npm_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
@@ -18,7 +18,7 @@ function __fish_npm_needs_command
end end
function __fish_npm_using_command function __fish_npm_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if contains -- $cmd[2] $argv if contains -- $cmd[2] $argv

View File

@@ -1,5 +1,5 @@
function __fish_opam_using_command function __fish_opam_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0
@@ -9,7 +9,7 @@ function __fish_opam_using_command
end end
function __fish_opam_at_color function __fish_opam_at_color
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 2 if test (count $cmd) -gt 2
if test $cmd[-1] = --color if test $cmd[-1] = --color
return 0 return 0
@@ -19,7 +19,7 @@ function __fish_opam_at_color
end end
function __fish_opam_needs_command function __fish_opam_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end

View File

@@ -2,7 +2,7 @@
if string match -q "OpenSSL*" (command openssl version) if string match -q "OpenSSL*" (command openssl version)
# This is real OpenSSL that has the list command. # This is real OpenSSL that has the list command.
function __fish_openssl_subcommand_options --description "Print options for openssl subcommand" function __fish_openssl_subcommand_options --description "Print options for openssl subcommand"
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
openssl list -options $cmd[2] | string replace -r -- '^(\S*)\s*.*' '-$1' openssl list -options $cmd[2] | string replace -r -- '^(\S*)\s*.*' '-$1'
end end

View File

@@ -1,7 +1,7 @@
#completion for opkg #completion for opkg
function __fish_opkg_no_subcommand -d 'Test if opkg has yet to be given the subcommand' function __fish_opkg_no_subcommand -d 'Test if opkg has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i update upgrade install configure remove flag list list-installed list-upgradable list-changed-conffiles files search find info status download compare-versions print-architecture depends whatdepends whatdependsrec whatrecommends whatsuggests whatprovides whatconflicts whatreplaces if contains -- $i update upgrade install configure remove flag list list-installed list-upgradable list-changed-conffiles files search find info status download compare-versions print-architecture depends whatdepends whatdependsrec whatrecommends whatsuggests whatprovides whatconflicts whatreplaces
return 1 return 1
end end
@@ -10,7 +10,7 @@ function __fish_opkg_no_subcommand -d 'Test if opkg has yet to be given the subc
end end
function __fish_opkg_use_package -d 'Test if opkg command should have packages as potential completion' function __fish_opkg_use_package -d 'Test if opkg command should have packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i contains install search find info status download compare-versions print-architecture depends whatdepends whatdependsrec whatrecommends whatsuggests whatprovides whatconflicts whatreplaces if contains -- $i contains install search find info status download compare-versions print-architecture depends whatdepends whatdependsrec whatrecommends whatsuggests whatprovides whatconflicts whatreplaces
return 0 return 0
end end
@@ -19,7 +19,7 @@ function __fish_opkg_use_package -d 'Test if opkg command should have packages a
end end
function __fish_opkg_use_package_installed -d 'Test if opkg command should have installed packages as potential completion' function __fish_opkg_use_package_installed -d 'Test if opkg command should have installed packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i contains upgrade configure remove flag files if contains -- $i contains upgrade configure remove flag files
return 0 return 0
end end

View File

@@ -285,7 +285,7 @@ end
######################################################### #########################################################
function __fish_p4_not_in_command -d "Checks that prompt is not inside of p4 command" function __fish_p4_not_in_command -d "Checks that prompt is not inside of p4 command"
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i (__fish_print_p4_commands_list) if contains -- $i (__fish_print_p4_commands_list)
return 1 return 1
end end
@@ -301,7 +301,7 @@ end
# in the arguments, even though if more than a single command is specified, # in the arguments, even though if more than a single command is specified,
# p4 will complain. # p4 will complain.
function __fish_p4_is_using_command -d "Checks if prompt is in a specific command" function __fish_p4_is_using_command -d "Checks if prompt is in a specific command"
if contains -- $argv[1] (commandline -opc) if contains -- $argv[1] (commandline -xpc)
return 0 return 0
end end
return 1 return 1

View File

@@ -1,35 +1,35 @@
# Completion for builtin path # Completion for builtin path
# This follows a strict command-then-options approach, so we can just test the number of tokens # This follows a strict command-then-options approach, so we can just test the number of tokens
complete -f -c path -n "test (count (commandline -opc)) -le 2" -s h -l help -d "Display help and exit" complete -f -c path -n "test (count (commandline -xpc)) -le 2" -s h -l help -d "Display help and exit"
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a basename -d 'Give basename for given paths' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a basename -d 'Give basename for given paths'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a dirname -d 'Give dirname for given paths' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a dirname -d 'Give dirname for given paths'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a extension -d 'Give extension for given paths' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a extension -d 'Give extension for given paths'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a change-extension -d 'Change extension for given paths' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a change-extension -d 'Change extension for given paths'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a mtime -d 'Show modification time' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a mtime -d 'Show modification time'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a normalize -d 'Normalize given paths (remove ./, resolve ../ against other components..)' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a normalize -d 'Normalize given paths (remove ./, resolve ../ against other components..)'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a resolve -d 'Normalize given paths and resolve symlinks' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a resolve -d 'Normalize given paths and resolve symlinks'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a filter -d 'Print paths that match a filter' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a filter -d 'Print paths that match a filter'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a is -d 'Return true if any path matched a filter' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a is -d 'Return true if any path matched a filter'
complete -f -c path -n "test (count (commandline -opc)) -lt 2" -a sort -d 'Sort paths' complete -f -c path -n "test (count (commandline -xpc)) -lt 2" -a sort -d 'Sort paths'
complete -f -c path -n "test (count (commandline -opc)) -ge 2" -s q -l quiet -d "Only return status, no output" complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s q -l quiet -d "Only return status, no output"
complete -f -c path -n "test (count (commandline -opc)) -ge 2" -s z -l null-in -d "Handle NULL-delimited input" complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s z -l null-in -d "Handle NULL-delimited input"
complete -f -c path -n "test (count (commandline -opc)) -ge 2" -s Z -l null-out -d "Print NULL-delimited output" complete -f -c path -n "test (count (commandline -xpc)) -ge 2" -s Z -l null-out -d "Print NULL-delimited output"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s v -l invert -d "Invert meaning of filters" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s v -l invert -d "Invert meaning of filters"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s t -l type -d "Filter by type" -x -a '(__fish_append , file link dir block char fifo socket)' complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s t -l type -d "Filter by type" -x -a '(__fish_append , file link dir block char fifo socket)'
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s f -d "Filter files" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s f -d "Filter files"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s d -d "Filter directories" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s d -d "Filter directories"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s l -d "Filter symlinks" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s l -d "Filter symlinks"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s p -l perm -d "Filter by permission" -x -a '(__fish_append , read write exec suid sgid user group)' complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s p -l perm -d "Filter by permission" -x -a '(__fish_append , read write exec suid sgid user group)'
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s r -d "Filter readable paths" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s r -d "Filter readable paths"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s w -d "Filter writable paths" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s w -d "Filter writable paths"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] filter is" -s x -d "Filter executable paths" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] filter is" -s x -d "Filter executable paths"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] mtime" -s R -l relative -d "Show seconds since the modification time" complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] mtime" -s R -l relative -d "Show seconds since the modification time"
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" \ complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] sort" \
-l key -x -a 'basename\t"Sort only by basename" dirname\t"Sort only by dirname" path\t"Sort by full path"' -l key -x -a 'basename\t"Sort only by basename" dirname\t"Sort only by dirname" path\t"Sort by full path"'
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" -s u -l unique -d 'Only leave the first of each run with the same key' complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] sort" -s u -l unique -d 'Only leave the first of each run with the same key'
complete -f -c path -n "test (count (commandline -opc)) -ge 2; and contains -- (commandline -opc)[2] sort" -s r -l reverse -d 'Reverse the order' complete -f -c path -n "test (count (commandline -xpc)) -ge 2; and contains -- (commandline -xpc)[2] sort" -s r -l reverse -d 'Reverse the order'
# Turn on file completions again. # Turn on file completions again.
# match takes a glob as first arg, expand takes only globs. # match takes a glob as first arg, expand takes only globs.
# We still want files completed then! # We still want files completed then!
complete -F -c path -n "test (count (commandline -opc)) -ge 2" complete -F -c path -n "test (count (commandline -xpc)) -ge 2"

View File

@@ -11,7 +11,7 @@ end
# Lists PHPUnit objects corresponding to the given option # Lists PHPUnit objects corresponding to the given option
function __fish_phpunit_list --argument-names option function __fish_phpunit_list --argument-names option
# Use the same PHPUnit binary as in the command being completed # Use the same PHPUnit binary as in the command being completed
set -l phpunit (commandline -opc)[1] set -l phpunit (commandline -xpc)[1]
test -x $phpunit test -x $phpunit
or return or return

View File

@@ -14,7 +14,7 @@ end
function __fish_pkg_is function __fish_pkg_is
for option in $argv for option in $argv
if contains $option (commandline -poc) if contains $option (commandline -pxc)
return 0 return 0
end end
end end
@@ -23,7 +23,7 @@ end
function __fish_pkg_subcommand function __fish_pkg_subcommand
set -l skip_next 1 set -l skip_next 1
for token in (commandline -opc) for token in (commandline -xpc)
if test $skip_next = 1 if test $skip_next = 1
set skip_next 0 set skip_next 0
continue continue

View File

@@ -13,7 +13,7 @@ function __fish_prt_ports -d 'Obtain a list of ports'
end end
function __fish_prt_no_subcommand -d 'Test if prt-get has yet to be given the command' function __fish_prt_no_subcommand -d 'Test if prt-get has yet to be given the command'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i install depinst grpinst update remove sysup lock unlock listlocked diff quickdiff search dsearch fsearch info path readme depends quickdep dependent deptree dup list printf listinst listorphans isinst current ls cat edit help dumpconfig version cache if contains -- $i install depinst grpinst update remove sysup lock unlock listlocked diff quickdiff search dsearch fsearch info path readme depends quickdep dependent deptree dup list printf listinst listorphans isinst current ls cat edit help dumpconfig version cache
return 1 return 1
end end
@@ -24,7 +24,7 @@ end
# a function to verify if prt-get should have packages as potential completion # a function to verify if prt-get should have packages as potential completion
function __fish_prt_use_package -d 'Test if prt-get should have packages as potential completion' function __fish_prt_use_package -d 'Test if prt-get should have packages as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i update remove lock unlock current if contains -- $i update remove lock unlock current
return 0 return 0
end end
@@ -34,7 +34,7 @@ end
# a function to test if prt-get should have ports as potential completions # a function to test if prt-get should have ports as potential completions
function __fish_prt_use_port -d 'Test if prt-get should have ports as potential completion' function __fish_prt_use_port -d 'Test if prt-get should have ports as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i install depinst grpinst diff depends quickdep dependent deptree isinst info path readme ls cat edit if contains -- $i install depinst grpinst diff depends quickdep dependent deptree isinst info path readme ls cat edit
return 0 return 0
end end

View File

@@ -1,7 +1,7 @@
# fish completion for pyenv # fish completion for pyenv
function __fish_pyenv_needs_command function __fish_pyenv_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end
@@ -9,7 +9,7 @@ function __fish_pyenv_needs_command
end end
function __fish_pyenv_using_command function __fish_pyenv_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -1,5 +1,5 @@
function __fish_qdbus_complete function __fish_qdbus_complete
argparse system 'bus=' literal help -- (commandline --cut-at-cursor --tokenize) 2>/dev/null argparse system 'bus=' literal help -- (commandline --cut-at-cursor --expand-tokens) 2>/dev/null
or return or return
if set -q _flag_help if set -q _flag_help
return return

View File

@@ -1,7 +1,7 @@
# fish completion for rbenv # fish completion for rbenv
function __fish_rbenv_needs_command function __fish_rbenv_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end
@@ -10,7 +10,7 @@ function __fish_rbenv_needs_command
end end
function __fish_rbenv_using_command function __fish_rbenv_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -137,7 +137,7 @@ function __reg_save_complete_args -a previous_token
end end
function __reg_complete_args -d 'Function to generate args' function __reg_complete_args -d 'Function to generate args'
set -l previous_token (commandline -oc)[-1] set -l previous_token (commandline -xc)[-1]
if __fish_seen_subcommand_from add if __fish_seen_subcommand_from add
__reg_add_complete_args $previous_token __reg_add_complete_args $previous_token

View File

@@ -1,5 +1,5 @@
function __fish_ruby-build_needs_command function __fish_ruby-build_needs_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -eq 1 if test (count $cmd) -eq 1
return 0 return 0
end end

View File

@@ -29,12 +29,12 @@ complete -c sbt -f -a '(string split "\n" "
tasks List the tasks defined for the current project tasks List the tasks defined for the current project
test Execute all tests test Execute all tests
" | string trim | string replace -r "\s+" "\t")' \ " | string trim | string replace -r "\s+" "\t")' \
-n 'not contains -- "new" (commandline -cpo); -n 'not contains -- "new" (commandline -cpx);
and not contains -- "client" (commandline -cpo)' and not contains -- "client" (commandline -cpx)'
# These cannot be combined with any other commands and require an argument # These cannot be combined with any other commands and require an argument
complete -c sbt -f -n 'test (count (commandline -cpo)) = 1 ' -a new -d 'Create a new sbt project from the given template' complete -c sbt -f -n 'test (count (commandline -cpx)) = 1 ' -a new -d 'Create a new sbt project from the given template'
complete -c sbt -f -n 'test (count (commandline -cpo)) = 1 ' -a client -d 'Connect to a server with an interactive sbt prompt' complete -c sbt -f -n 'test (count (commandline -cpx)) = 1 ' -a client -d 'Connect to a server with an interactive sbt prompt'
########### ###########

View File

@@ -214,7 +214,7 @@ function __schtasks_run_complete_args -a previous_token
end end
function __schtasks_complete_args -d 'Function to generate args' function __schtasks_complete_args -d 'Function to generate args'
set --local previous_token (commandline -oc)[-1] set --local previous_token (commandline -xc)[-1]
if __fish_seen_argument -w change if __fish_seen_argument -w change
__schtasks_change_complete_args "$previous_token" __schtasks_change_complete_args "$previous_token"

View File

@@ -17,7 +17,7 @@ function __fish_complete_freebsd_service_actions
# Use the output of `service -v foo` to retrieve the list of service-specific verbs # Use the output of `service -v foo` to retrieve the list of service-specific verbs
# Output takes the form "[prefix1 prefix2 ..](cmd1 cmd2 cmd3)" where any combination # Output takes the form "[prefix1 prefix2 ..](cmd1 cmd2 cmd3)" where any combination
# of zero or one prefixe(s) and any one command is a valid verb. # of zero or one prefixe(s) and any one command is a valid verb.
set -l service_name (commandline --tokenize --cut-at-cursor)[-1] set -l service_name (commandline --expand-tokens --cut-at-cursor)[-1]
set -l results (service $service_name -v 2>| string match -r '\\[(.*)\\]\\((.*)\\)') set -l results (service $service_name -v 2>| string match -r '\\[(.*)\\]\\((.*)\\)')
set -l prefixes "" (string split '|' -- $results[2]) set -l prefixes "" (string split '|' -- $results[2])
set -l commands (string split '|' -- $results[3]) set -l commands (string split '|' -- $results[3])

View File

@@ -7,7 +7,7 @@
# #
function __fish_set_is_color -a foreground background -d 'Test if We are specifying a color value for the prompt' function __fish_set_is_color -a foreground background -d 'Test if We are specifying a color value for the prompt'
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
set -e cmd[1] set -e cmd[1]
for i in $cmd for i in $cmd
switch $i switch $i
@@ -28,7 +28,7 @@ function __fish_set_is_color -a foreground background -d 'Test if We are specify
end end
function __fish_set_is_locale -d 'Test if We are specifying a locale value for the prompt' function __fish_set_is_locale -d 'Test if We are specifying a locale value for the prompt'
set -l cmd (commandline -poc) set -l cmd (commandline -pxc)
set -e cmd[1] set -e cmd[1]
for i in $cmd for i in $cmd
switch $i switch $i

View File

@@ -1,5 +1,5 @@
function __setx_complete_args -d 'Function to generate args' function __setx_complete_args -d 'Function to generate args'
set -l previous_token (commandline -oc)[-1] set -l previous_token (commandline -xc)[-1]
if test "$previous_token" = /u if test "$previous_token" = /u
__fish_print_windows_users __fish_print_windows_users

View File

@@ -1,7 +1,7 @@
# Tab completion for sfdx (https://developer.salesforce.com/tools/sfdxcli). # Tab completion for sfdx (https://developer.salesforce.com/tools/sfdxcli).
function __fish_sfdx_using_command function __fish_sfdx_using_command
set -l cmd (commandline -opc) set -l cmd (commandline -xpc)
if test (count $cmd) -gt 1 if test (count $cmd) -gt 1
if test $argv[1] = $cmd[2] if test $argv[1] = $cmd[2]
return 0 return 0

View File

@@ -12,7 +12,7 @@ end
# output is like: # output is like:
# function __fish_shortcuts_using_command # function __fish_shortcuts_using_command
# set cmd (commandline -opc) # set cmd (commandline -xpc)
# if test (count $cmd) -eq (count $argv) # if test (count $cmd) -eq (count $argv)
# for i in (seq (count $argv)) # for i in (seq (count $argv))
# if test $cmd[$i] != $argv[$i] # if test $cmd[$i] != $argv[$i]
@@ -36,8 +36,8 @@ end
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts run --output-path' -f -a '(for i in *.{}; echo $i;end)' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts run --output-path' -f -a '(for i in *.{}; echo $i;end)'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts run' -f -r -l output-type -d 'What type to output data in, in Universal Type Identifier format.' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts run' -f -r -l output-type -d 'What type to output data in, in Universal Type Identifier format.'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list' -f -r -s f -l folder-name -d 'The folder to list.' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list' -f -r -s f -l folder-name -d 'The folder to list.'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list -f' -f -a '(command shortcuts ---completion list -- --custom (commandline -opc)[1..-1])' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list -f' -f -a '(command shortcuts ---completion list -- --custom (commandline -xpc)[1..-1])'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list --folder-name' -f -a '(command shortcuts ---completion list -- --custom (commandline -opc)[1..-1])' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list --folder-name' -f -a '(command shortcuts ---completion list -- --custom (commandline -xpc)[1..-1])'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list' -f -l folders -d 'List folders instead of shortcuts.' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts list' -f -l folders -d 'List folders instead of shortcuts.'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts sign' -f -r -s m -l mode -d 'The signing mode.' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts sign' -f -r -s m -l mode -d 'The signing mode.'
# complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts sign' -f -r -s i -l input -d 'The shortcut file to sign.' # complete -c shortcuts -n '__fish_shortcuts_using_command shortcuts sign' -f -r -s i -l input -d 'The shortcut file to sign.'

View File

@@ -1,7 +1,7 @@
# Completions for `snap` command # Completions for `snap` command
function __fish_snap_no_subcommand -d 'Test if snap has yet to be given the subcommand' function __fish_snap_no_subcommand -d 'Test if snap has yet to be given the subcommand'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i abort ack alias aliases buy changes connect disable disconnect download \ if contains -- $i abort ack alias aliases buy changes connect disable disconnect download \
enable find get help info install interfaces known list login logout prefer refresh remove \ enable find get help info install interfaces known list login logout prefer refresh remove \
revert run set tasks try unalias version watch revert run set tasks try unalias version watch
@@ -12,7 +12,7 @@ function __fish_snap_no_subcommand -d 'Test if snap has yet to be given the subc
end end
function __fish_snap_using_subcommand -d 'Test if given subcommand is used' function __fish_snap_using_subcommand -d 'Test if given subcommand is used'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i $argv[1] if contains -- $i $argv[1]
return 0 return 0
end end
@@ -21,7 +21,7 @@ function __fish_snap_using_subcommand -d 'Test if given subcommand is used'
end end
function __fish_snap_use_file -d 'Test if snap command should have files as potential completion' function __fish_snap_use_file -d 'Test if snap command should have files as potential completion'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i ack try if contains -- $i ack try
return 0 return 0
end end
@@ -71,7 +71,7 @@ function __fish_snap_aliases -d 'List aliases'
end end
function __fish_snap_no_assertion -d 'Check that no assertion type is used yet' function __fish_snap_no_assertion -d 'Check that no assertion type is used yet'
for i in (commandline -opc) for i in (commandline -xpc)
if contains -- $i account account-key model serial snap-declaration snap-build snap-revision \ if contains -- $i account account-key model serial snap-declaration snap-build snap-revision \
system-user validation system-user validation
return 1 return 1

View File

@@ -5,7 +5,7 @@ function __fish_sops_no_subcommand --description "Test if there is a subcommand
end end
function __fish_sops_print_remaining_args --description "Print remaining argument given" function __fish_sops_print_remaining_args --description "Print remaining argument given"
set -l cmd (commandline -poc) (commandline -ct) set -l cmd (commandline -pxc) (commandline -ct)
set -e cmd[1] set -e cmd[1]
set -l opts d/decrypt e/encrypt r/rotate i/in-place s/show-master-keys v/version set -l opts d/decrypt e/encrypt r/rotate i/in-place s/show-master-keys v/version
set -a opts extract ignore-mac verbose enable-local-keyservice set -a opts extract ignore-mac verbose enable-local-keyservice

View File

@@ -4,7 +4,7 @@
spago --fish-completion-script (command -v spago) | source spago --fish-completion-script (command -v spago) | source
function __fish_spago_is_arg_n --argument-names n function __fish_spago_is_arg_n --argument-names n
test $n -eq (count (string match -v -- '-*' (commandline -poc))) test $n -eq (count (string match -v -- '-*' (commandline -pxc)))
end end
function __fish_spago_pkgnames function __fish_spago_pkgnames

View File

@@ -1,63 +1,63 @@
# Completion for builtin string # Completion for builtin string
# This follows a strict command-then-options approach, so we can just test the number of tokens # This follows a strict command-then-options approach, so we can just test the number of tokens
complete -f -c string complete -f -c string
complete -f -c string -n "test (count (commandline -opc)) -le 2" -s h -l help -d "Display help and exit" complete -f -c string -n "test (count (commandline -xpc)) -le 2" -s h -l help -d "Display help and exit"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "not contains -- (commandline -opc)[2] escape collect pad" -s q -l quiet -d "Do not print output" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "not contains -- (commandline -xpc)[2] escape collect pad" -s q -l quiet -d "Do not print output"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a lower complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a lower
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a upper complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a upper
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a length complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a length
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] length" -s V -l visible -d "Use the visible width, excluding escape sequences" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] length" -s V -l visible -d "Use the visible width, excluding escape sequences"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a sub complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a sub
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] sub" -s s -l start -xa "(seq 1 10)" -d "Sepcify start index" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] sub" -s s -l start -xa "(seq 1 10)" -d "Sepcify start index"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] sub" -s e -l end -xa "(seq 1 10)" -d "Sepcify end index" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] sub" -s e -l end -xa "(seq 1 10)" -d "Sepcify end index"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] sub" -s l -l length -xa "(seq 1 10)" -d "Sepcify substring length" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] sub" -s l -l length -xa "(seq 1 10)" -d "Sepcify substring length"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a split complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a split
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a split0 complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a split0
complete -x -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s m -l max -a "(seq 1 10)" -d "Specify maximum number of splits" complete -x -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -xpc)[2]' -s m -l max -a "(seq 1 10)" -d "Specify maximum number of splits"
complete -x -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s f -l fields -a "(seq 1 10)" -d "Specify fields" complete -x -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -xpc)[2]' -s f -l fields -a "(seq 1 10)" -d "Specify fields"
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s r -l right -d "Split right-to-left" complete -f -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -xpc)[2]' -s r -l right -d "Split right-to-left"
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -opc)[2]' -s n -l no-empty -d "Empty results excluded" complete -f -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'string match -qr split0\?\$ -- (commandline -xpc)[2]' -s n -l no-empty -d "Empty results excluded"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a collect complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a collect
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -opc)[2]' -s N -l no-trim-newlines -d "Don't trim trailing newlines" complete -f -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -xpc)[2]' -s N -l no-trim-newlines -d "Don't trim trailing newlines"
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -opc)[2]' -s a -l allow-empty -d "Always print empty argument" complete -f -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'string match -qr collect\$ -- (commandline -xpc)[2]' -s a -l allow-empty -d "Always print empty argument"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a join complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a join
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a join0 complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a join0
complete -f -c string -n 'test (count (commandline -opc)) -ge 2' -n 'contains -- (commandline -opc)[2] join' -s n -l no-empty -d "Empty strings excluded" complete -f -c string -n 'test (count (commandline -xpc)) -ge 2' -n 'contains -- (commandline -xpc)[2] join' -s n -l no-empty -d "Empty strings excluded"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a trim complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a trim
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] trim" -s l -l left -d "Trim only leading chars" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] trim" -s l -l left -d "Trim only leading chars"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] trim" -s r -l right -d "Trim only trailing chars" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] trim" -s r -l right -d "Trim only trailing chars"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] trim" -s c -l chars -d "Specify the chars to trim (default: whitespace)" -x complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] trim" -s c -l chars -d "Specify the chars to trim (default: whitespace)" -x
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a escape complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a escape
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a unescape complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a unescape
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] escape; or contains -- (commandline -opc)[2] unescape" -s n -l no-quoted -d "Escape with \\ instead of quotes" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] escape; or contains -- (commandline -xpc)[2] unescape" -s n -l no-quoted -d "Escape with \\ instead of quotes"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] escape; or contains -- (commandline -opc)[2] unescape" -l style -d "Specify escaping style" -xa " complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] escape; or contains -- (commandline -xpc)[2] unescape" -l style -d "Specify escaping style" -xa "
(printf '%s\t%s\n' script 'For use in scripts' \ (printf '%s\t%s\n' script 'For use in scripts' \
var 'For use as a variable name' \ var 'For use as a variable name' \
regex 'For string match -r, string replace -r' \ regex 'For string match -r, string replace -r' \
url 'For use as a URL')" url 'For use as a URL')"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a match complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a match
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s n -l index -d "Report index, length of match" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match" -s n -l index -d "Report index, length of match"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s v -l invert -d "Report only non-matches" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match" -s v -l invert -d "Report only non-matches"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s e -l entire -d "Show entire matching lines" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match" -s e -l entire -d "Show entire matching lines"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match" -s g -l groups-only -d "Only report capturing groups" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match" -s g -l groups-only -d "Only report capturing groups"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a replace complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a replace
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] replace" -s f -l filter -d "Report only actual replacements" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] replace" -s f -l filter -d "Report only actual replacements"
# All replace options are also valid for match # All replace options are also valid for match
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match replace" -s a -l all -d "Report every match" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match replace" -s a -l all -d "Report every match"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match replace" -s i -l ignore-case -d "Case insensitive" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match replace" -s i -l ignore-case -d "Case insensitive"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] match replace" -s r -l regex -d "Use regex instead of globs" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match replace" -s r -l regex -d "Use regex instead of globs"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a repeat complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a repeat
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] repeat" -s n -l count -xa "(seq 1 10)" -d "Repetition count" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] repeat" -s n -l count -xa "(seq 1 10)" -d "Repetition count"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] repeat" -s m -l max -xa "(seq 1 10)" -d "Maximum number of printed chars" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] repeat" -s m -l max -xa "(seq 1 10)" -d "Maximum number of printed chars"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] repeat" -s N -l no-newline -d "Remove newline" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] repeat" -s N -l no-newline -d "Remove newline"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a pad complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a pad
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] pad" -s r -l right -d "Pad right instead of left" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] pad" -s r -l right -d "Pad right instead of left"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] pad" -s c -l char -x -d "Character to use for padding" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] pad" -s c -l char -x -d "Character to use for padding"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] pad" -s w -l width -x -d "Integer width of the result, default is maximum width of inputs" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] pad" -s w -l width -x -d "Integer width of the result, default is maximum width of inputs"
complete -f -c string -n "test (count (commandline -opc)) -lt 2" -a shorten complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a shorten
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] shorten" -s l -l left -d "Remove from the left on" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] shorten" -s l -l left -d "Remove from the left on"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] shorten" -s c -l char -x -d "Characters to use as ellipsis" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] shorten" -s c -l char -x -d "Characters to use as ellipsis"
complete -x -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] shorten" -s m -l max -x -d "Integer width of the result, default is minimum non-zero width of inputs" complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] shorten" -s m -l max -x -d "Integer width of the result, default is minimum non-zero width of inputs"
complete -f -c string -n "test (count (commandline -opc)) -ge 2" -n "contains -- (commandline -opc)[2] shorten" -s N -l no-newline -d "Only keep one line of each input" complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] shorten" -s N -l no-newline -d "Only keep one line of each input"

Some files were not shown because too many files have changed in this diff Show More