Run fish_indent on share/completions/*.fish

This commit is contained in:
Johannes Altmanninger 2022-12-08 14:57:22 +01:00
parent aa3d2c89b3
commit e9bf8b9a4e
13 changed files with 136 additions and 139 deletions

View file

@ -207,5 +207,3 @@ complete -n '__fish_seen_subcommand_from logcat' -c adb -s e -l regex -d 'Only p
complete -n '__fish_seen_subcommand_from logcat' -c adb -s m -l max-count -d 'Quit after print <count> lines' complete -n '__fish_seen_subcommand_from logcat' -c adb -s m -l max-count -d 'Quit after print <count> lines'
complete -n '__fish_seen_subcommand_from logcat' -c adb -l print -d 'Print all message even if they do not matches, requires --regex and --max-count' complete -n '__fish_seen_subcommand_from logcat' -c adb -l print -d 'Print all message even if they do not matches, requires --regex and --max-count'
complete -n '__fish_seen_subcommand_from logcat' -c adb -l uid -d 'Only display log messages from UIDs present in the comma separate list <uids>' complete -n '__fish_seen_subcommand_from logcat' -c adb -l uid -d 'Only display log messages from UIDs present in the comma separate list <uids>'

View file

@ -65,4 +65,4 @@ else
complete apropos -s p -d "format & pipe through pager" -f complete apropos -s p -d "format & pipe through pager" -f
complete apropos -s r -d "disable formatting" -f complete apropos -s r -d "disable formatting" -f
end end
end end

View file

@ -15,7 +15,7 @@ complete -c asciinema -n "__fish_seen_subcommand_from rec" -s e -l env -d "List
complete -c asciinema -n "__fish_seen_subcommand_from rec" -s t -l title -d "Title of the asciicast" -x complete -c asciinema -n "__fish_seen_subcommand_from rec" -s t -l title -d "Title of the asciicast" -x
complete -c asciinema -n "__fish_seen_subcommand_from rec" -s i -l idle-time-limit -d "Limit recorded idle time to given number of seconds" -x complete -c asciinema -n "__fish_seen_subcommand_from rec" -s i -l idle-time-limit -d "Limit recorded idle time to given number of seconds" -x
complete -c asciinema -n "__fish_seen_subcommand_from rec" -l cols -d "Override terminal columns for recorded process" -x complete -c asciinema -n "__fish_seen_subcommand_from rec" -l cols -d "Override terminal columns for recorded process" -x
complete -c asciinema -n "__fish_seen_subcommand_from rec" -l rows -d "Override terminal rows for recorded process" -x complete -c asciinema -n "__fish_seen_subcommand_from rec" -l rows -d "Override terminal rows for recorded process" -x
complete -c asciinema -n "__fish_seen_subcommand_from rec" -s y -l yes -d "Answer \"yes\" to all prompts" complete -c asciinema -n "__fish_seen_subcommand_from rec" -s y -l yes -d "Answer \"yes\" to all prompts"
complete -c asciinema -n "__fish_seen_subcommand_from rec" -s q -l quiet -d "Be quiet, suppress all notices/warnings" complete -c asciinema -n "__fish_seen_subcommand_from rec" -s q -l quiet -d "Be quiet, suppress all notices/warnings"

View file

@ -40,12 +40,12 @@ set -l bb_helper '
(aliases)))' (aliases)))'
function __fish_clj_aliases -V bb_helper function __fish_clj_aliases -V bb_helper
command -q bb ; or return command -q bb; or return
bb -e "$bb_helper" bb -e "$bb_helper"
end end
function __fish_clj_tools -V bb_helper function __fish_clj_tools -V bb_helper
command -q bb ; or return command -q bb; or return
bb -e "$bb_helper" tools bb -e "$bb_helper" tools
end end

View file

@ -94,19 +94,19 @@ end
complete -c env -a "(__fish_complete_env_subcommand)" complete -c env -a "(__fish_complete_env_subcommand)"
# Complete the name of the variable to redefine # Complete the name of the variable to redefine
complete -c env -n '__fish_env_defining_vars; and not string match -eq = -- (commandline -ct)' -a "(__fish_env_redefine_vars)" -f -d "Redefine variable" complete -c env -n '__fish_env_defining_vars; and not string match -eq = -- (commandline -ct)' -a "(__fish_env_redefine_vars)" -f -d "Redefine variable"
complete -c env -n '__fish_env_defining_vars; and not string match -eq = -- (commandline -ct)' -a "(__fish_env_names_from_history)" -f -d "Historical" complete -c env -n '__fish_env_defining_vars; and not string match -eq = -- (commandline -ct)' -a "(__fish_env_names_from_history)" -f -d Historical
complete -c env -n '__fish_env_defining_vars; and string match -eq = -- (commandline -ct)' -a "(__fish_env_values_from_history)" -f complete -c env -n '__fish_env_defining_vars; and string match -eq = -- (commandline -ct)' -a "(__fish_env_values_from_history)" -f
if set -q is_gnu if set -q is_gnu
complete -c env -n '__fish_env_not_yet_vars' -s i -l ignore-environment -d "Start with an empty environment" complete -c env -n __fish_env_not_yet_vars -s i -l ignore-environment -d "Start with an empty environment"
complete -c env -n '__fish_env_not_yet_vars' -s u -l unset -d "Unset environment variable" -x -a "(set --names -x)" complete -c env -n __fish_env_not_yet_vars -s u -l unset -d "Unset environment variable" -x -a "(set --names -x)"
complete -c env -n '__fish_env_not_yet_vars' -l help -d "Display help and exit" complete -c env -n __fish_env_not_yet_vars -l help -d "Display help and exit"
complete -c env -n '__fish_env_not_yet_vars' -l version -d "Display version and exit" complete -c env -n __fish_env_not_yet_vars -l version -d "Display version and exit"
else else
complete -c env -n '__fish_env_not_yet_vars' -s 0 -d "End output lines with NUL" complete -c env -n __fish_env_not_yet_vars -s 0 -d "End output lines with NUL"
complete -c env -n '__fish_env_not_yet_vars' -s i -d "Start with empty environment" complete -c env -n __fish_env_not_yet_vars -s i -d "Start with empty environment"
complete -c env -n '__fish_env_not_yet_vars' -s P -d "Provide an alternate PATH" complete -c env -n __fish_env_not_yet_vars -s P -d "Provide an alternate PATH"
complete -c env -n '__fish_env_not_yet_vars' -s S -d "Split argument into args on ' '" complete -c env -n __fish_env_not_yet_vars -s S -d "Split argument into args on ' '"
complete -c env -n '__fish_env_not_yet_vars' -s u -d "Unset environment variable" -x -a "(set --names -x)" complete -c env -n __fish_env_not_yet_vars -s u -d "Unset environment variable" -x -a "(set --names -x)"
complete -c env -n '__fish_env_not_yet_vars' -s v -d "Verbose output on processing" complete -c env -n __fish_env_not_yet_vars -s v -d "Verbose output on processing"
end end

View file

@ -201,8 +201,8 @@ function __fish_git_files
# "u <xy> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>" # "u <xy> <sub> <m1> <m2> <m3> <mW> <h1> <h2> <h3> <path>"
# This is first to distinguish it from normal modifications et al. # This is first to distinguish it from normal modifications et al.
set -ql unmerged set -ql unmerged
and set file "$line[11..-1]" and set file "$line[11..-1]"
and set desc $unmerged_desc and set desc $unmerged_desc
case '2 .R*' '2 R.*' case '2 .R*' '2 R.*'
# Renamed/Copied # Renamed/Copied
# From the docs: "Renamed or copied entries have the following format:" # From the docs: "Renamed or copied entries have the following format:"
@ -210,44 +210,44 @@ function __fish_git_files
# Since <sep> is \t, we can't really parse it unambiguously. # Since <sep> is \t, we can't really parse it unambiguously.
# The "-z" format would be great here! # The "-z" format would be great here!
set -ql renamed set -ql renamed
and set file (string replace -r '\t[^\t]*' '' -- "$line[10..-1]") and set file (string replace -r '\t[^\t]*' '' -- "$line[10..-1]")
and set desc $renamed_desc and set desc $renamed_desc
case '2 RM*' '2 RT*' case '2 RM*' '2 RT*'
# Staged as renamed, with unstaged modifications (issue #6031) # Staged as renamed, with unstaged modifications (issue #6031)
set -ql renamed set -ql renamed
or set -ql modified or set -ql modified
and set file (string replace -r '\t[^\t]*' '' -- "$line[10..-1]") and set file (string replace -r '\t[^\t]*' '' -- "$line[10..-1]")
set -ql renamed set -ql renamed
and set desc $renamed_desc and set desc $renamed_desc
set -ql modified set -ql modified
and set --append desc $modified_desc and set --append desc $modified_desc
case '2 RD*' case '2 RD*'
# Staged as renamed, but deleted in the worktree # Staged as renamed, but deleted in the worktree
set -ql renamed set -ql renamed
or set -ql deleted or set -ql deleted
and set file (string replace -r '\t[^\t]*' '' -- "$line[10..-1]") and set file (string replace -r '\t[^\t]*' '' -- "$line[10..-1]")
set -ql renamed set -ql renamed
and set desc $renamed_desc and set desc $renamed_desc
set -ql deleted set -ql deleted
and set --append desc $deleted_desc and set --append desc $deleted_desc
case '2 .C*' '2 C.*' case '2 .C*' '2 C.*'
set -ql copied set -ql copied
and set file (string replace -r '\t[^\t].*' '' -- "$line[10..-1]") and set file (string replace -r '\t[^\t].*' '' -- "$line[10..-1]")
and set desc $copied_desc and set desc $copied_desc
case '1 A.*' case '1 A.*'
# Additions are only shown here if they are staged. # Additions are only shown here if they are staged.
# Otherwise it's an untracked file. # Otherwise it's an untracked file.
set -ql added set -ql added
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $added_desc and set desc $added_desc
case '1 AD*' case '1 AD*'
# Added files that were since deleted # Added files that were since deleted
if set -ql added if set -ql added
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $added_desc set desc $added_desc
else if set -ql deleted else if set -ql deleted
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $deleted_desc set desc $deleted_desc
end end
case "1 AM*" "1 AT*" case "1 AM*" "1 AT*"
# Added files with additional modifications # Added files with additional modifications
@ -255,71 +255,71 @@ function __fish_git_files
# it happens when e.g. a file is replaced with a symlink. # it happens when e.g. a file is replaced with a symlink.
# For our purposes it's the same as modified) # For our purposes it's the same as modified)
if set -ql added if set -ql added
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $added_desc set desc $added_desc
else if set -ql modified else if set -ql modified
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $modified_desc set desc $modified_desc
end end
case '1 .A*' case '1 .A*'
# Files added with git add --intent-to-add. # Files added with git add --intent-to-add.
set -ql untracked set -ql untracked
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $untracked_desc and set desc $untracked_desc
case '1 .M*' '1 .T*' case '1 .M*' '1 .T*'
# Modified # Modified
# From the docs: "Ordinary changed entries have the following format:" # From the docs: "Ordinary changed entries have the following format:"
# "1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path>" # "1 <XY> <sub> <mH> <mI> <mW> <hH> <hI> <path>"
# Since <path> can contain spaces, print from element 9 onwards # Since <path> can contain spaces, print from element 9 onwards
set -ql modified set -ql modified
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $modified_desc and set desc $modified_desc
case '1 MD*' '1 TD*' case '1 MD*' '1 TD*'
set -ql modified_staged_deleted set -ql modified_staged_deleted
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $modified_staged_deleted_desc and set desc $modified_staged_deleted_desc
case '1 M.*' '1 T.*' case '1 M.*' '1 T.*'
# If the character is first ("M."), then that means it's "our" change, # If the character is first ("M."), then that means it's "our" change,
# which means it is staged. # which means it is staged.
# This is useless for many commands - e.g. `checkout` won't do anything with this. # This is useless for many commands - e.g. `checkout` won't do anything with this.
# So it needs to be requested explicitly. # So it needs to be requested explicitly.
set -ql modified_staged set -ql modified_staged
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $staged_modified_desc and set desc $staged_modified_desc
case '1 MM*' '1 MT*' '1 TM*' '1 TT*' case '1 MM*' '1 MT*' '1 TM*' '1 TT*'
# Staged-modified with unstaged modifications # Staged-modified with unstaged modifications
# These need to be offered for both kinds of modified. # These need to be offered for both kinds of modified.
if set -ql modified if set -ql modified
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $modified_desc set desc $modified_desc
else if set -ql modified_staged else if set -ql modified_staged
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $staged_modified_desc set desc $staged_modified_desc
end end
case '1 .D*' case '1 .D*'
set -ql deleted set -ql deleted
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $deleted_desc and set desc $deleted_desc
case '1 D.*' case '1 D.*'
# TODO: The docs are unclear on this. # TODO: The docs are unclear on this.
# There is both X unmodified and Y either M or D ("not updated") # There is both X unmodified and Y either M or D ("not updated")
# and Y is D and X is unmodified or [MARC] ("deleted in work tree"). # and Y is D and X is unmodified or [MARC] ("deleted in work tree").
# For our purposes, we assume this is a staged deletion. # For our purposes, we assume this is a staged deletion.
set -ql deleted_staged set -ql deleted_staged
and set file "$line[9..-1]" and set file "$line[9..-1]"
and set desc $staged_deleted_desc and set desc $staged_deleted_desc
case "$q"' *' case "$q"' *'
# Untracked # Untracked
# "? <path>" - print from element 2 on. # "? <path>" - print from element 2 on.
set -ql untracked set -ql untracked
and set file "$line[2..-1]" and set file "$line[2..-1]"
and set desc $untracked_desc and set desc $untracked_desc
case '! *' case '! *'
# Ignored # Ignored
# "! <path>" - print from element 2 on. # "! <path>" - print from element 2 on.
set -ql ignored set -ql ignored
and set file "$line[2..-1]" and set file "$line[2..-1]"
and set desc $ignored_desc and set desc $ignored_desc
end end
# Only try printing if the file was selected. # Only try printing if the file was selected.
if set -q file[1] if set -q file[1]
@ -330,7 +330,7 @@ function __fish_git_files
# We just remove the quotes and hope it works out. # We just remove the quotes and hope it works out.
# If this contains newlines or tabs, # If this contains newlines or tabs,
# there is nothing we can do, but that's a general issue with scripted completions. # there is nothing we can do, but that's a general issue with scripted completions.
set file (string trim -c \" -- $file) set file (string trim -c \" -- $file)
# The relative filename. # The relative filename.
if string match -q './*' -- (commandline -ct) if string match -q './*' -- (commandline -ct)
printf './%s\t%s\n' $file $d printf './%s\t%s\n' $file $d
@ -368,7 +368,7 @@ function __fish_git_files
if set -q use_next[1] if set -q use_next[1]
if contains -- $use_next $argv if contains -- $use_next $argv
set -l var "$use_next"_desc set -l var "$use_next"_desc
set desc $$var set desc $$var
set -e use_next[1] set -e use_next[1]
else else
set -e use_next[1] set -e use_next[1]
@ -401,54 +401,54 @@ function __fish_git_files
continue continue
case AM case AM
if set -ql added if set -ql added
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $added_desc set desc $added_desc
else if set -ql modified else if set -ql modified
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $modified_desc set desc $modified_desc
end end
case AD case AD
if set -ql added if set -ql added
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $added_desc set desc $added_desc
else if set -ql deleted else if set -ql deleted
set file "$line[9..-1]" set file "$line[9..-1]"
set desc $deleted_desc set desc $deleted_desc
end end
case 'A ' case 'A '
# Additions are only shown here if they are staged. # Additions are only shown here if they are staged.
# Otherwise it's an untracked file. # Otherwise it's an untracked file.
set -ql added set -ql added
and set desc $added_desc and set desc $added_desc
case '*M' case '*M'
# Modified # Modified
set -ql modified set -ql modified
and set desc $modified_desc and set desc $modified_desc
case 'M*' case 'M*'
# If the character is first ("M "), then that means it's "our" change, # If the character is first ("M "), then that means it's "our" change,
# which means it is staged. # which means it is staged.
# This is useless for many commands - e.g. `checkout` won't do anything with this. # This is useless for many commands - e.g. `checkout` won't do anything with this.
# So it needs to be requested explicitly. # So it needs to be requested explicitly.
set -ql modified_staged set -ql modified_staged
and set desc $staged_modified_desc and set desc $staged_modified_desc
case '*D' case '*D'
set -ql deleted set -ql deleted
and set desc $deleted_desc and set desc $deleted_desc
case 'D*' case 'D*'
# TODO: The docs are unclear on this. # TODO: The docs are unclear on this.
# There is both X unmodified and Y either M or D ("not updated") # There is both X unmodified and Y either M or D ("not updated")
# and Y is D and X is unmodified or [MARC] ("deleted in work tree"). # and Y is D and X is unmodified or [MARC] ("deleted in work tree").
# For our purposes, we assume this is a staged deletion. # For our purposes, we assume this is a staged deletion.
set -ql deleted_staged set -ql deleted_staged
and set desc $staged_deleted_desc and set desc $staged_deleted_desc
case "$q$q" case "$q$q"
# Untracked # Untracked
set -ql untracked set -ql untracked
and set desc $untracked_desc and set desc $untracked_desc
case '!!' case '!!'
# Ignored # Ignored
set -ql ignored set -ql ignored
and set desc $ignored_desc and set desc $ignored_desc
end end
if set -q desc[1] if set -q desc[1]
# Again: "XY filename", so the filename starts on character 4. # Again: "XY filename", so the filename starts on character 4.
@ -481,12 +481,12 @@ function __fish_git_files
# The filename with ":/:" prepended. # The filename with ":/:" prepended.
if string match -q '../*' -- $file if string match -q '../*' -- $file
or string match -q ':*' -- (commandline -ct) or string match -q ':*' -- (commandline -ct)
set file (string replace -- "$root/" ":/:" "$root/$relfile") set file (string replace -- "$root/" ":/:" "$root/$relfile")
end end
if test "$root/$relfile" -ef "$relfile" if test "$root/$relfile" -ef "$relfile"
and not string match -q ':*' -- (commandline -ct) and not string match -q ':*' -- (commandline -ct)
set file $relfile set file $relfile
end end
printf '%s\n' $file\t$desc printf '%s\n' $file\t$desc
@ -1448,10 +1448,10 @@ complete -c git -n '__fish_git_using_command log' -l cherry-pick -d 'Omit equiva
complete -c git -n '__fish_git_using_command log' -l walk-reflogs -s g -d 'Traverse the reflog' complete -c git -n '__fish_git_using_command log' -l walk-reflogs -s g -d 'Traverse the reflog'
complete -c git -n '__fish_git_using_command log' -l no-walk -a "sorted unsorted" -f complete -c git -n '__fish_git_using_command log' -l no-walk -a "sorted unsorted" -f
complete -c git -n '__fish_git_using_command log' -f -l bisect -l color-words -l abbrev -l notes -l expand-tabs -l show-notes -l show-linear-break complete -c git -n '__fish_git_using_command log' -f -l bisect -l color-words -l abbrev -l notes -l expand-tabs -l show-notes -l show-linear-break
complete -c git -n '__fish_git_using_command log' -l use-mailmap -l full-diff -l log-size -l left-only -l right-only -l cherry -l merge -l boundary -l simplify-by-decoration -l full-history -l dense -l sparse -l simplify-merges -l ancestry-path -l date-order \ complete -c git -n '__fish_git_using_command log' -l use-mailmap -l full-diff -l log-size -l left-only -l right-only -l cherry -l merge -l boundary -l simplify-by-decoration -l full-history -l dense -l sparse -l simplify-merges -l ancestry-path -l date-order \
-l do-walk -l format -l abbrev-commit -l no-abbrev-commit -l oneline -l no-expand-tabs -l no-notes -l standard-notes -l no-standard-notes -l show-signature -l relative-date -l parents -l children -l left-right -l cc -l graph -l numstat -l shortstat -l summary \ -l do-walk -l format -l abbrev-commit -l no-abbrev-commit -l oneline -l no-expand-tabs -l no-notes -l standard-notes -l no-standard-notes -l show-signature -l relative-date -l parents -l children -l left-right -l cc -l graph -l numstat -l shortstat -l summary \
-l patch-with-stat -l name-only -l name-status -l raw -l patch-with-raw -l indent-heuristic -l no-indent-heuristic -l compaction-heuristic -l no-compaction-heuristic -l minimal -l patience -l histogram -l no-color -l no-renames -l check -l full-index -l binary \ -l patch-with-stat -l name-only -l name-status -l raw -l patch-with-raw -l indent-heuristic -l no-indent-heuristic -l compaction-heuristic -l no-compaction-heuristic -l minimal -l patience -l histogram -l no-color -l no-renames -l check -l full-index -l binary \
-l author-date-order -l topo-order -l reverse -l author-date-order -l topo-order -l reverse
complete -c git -n '__fish_git_using_command log' -l date -a "relative local iso iso-local iso8601 iso8601-local iso-strict iso-strict-local iso8601-strict iso8601-strict-local rfc-local rfc2822-local short short-local raw human unix format: default default-local" -x complete -c git -n '__fish_git_using_command log' -l date -a "relative local iso iso-local iso8601 iso8601-local iso-strict iso-strict-local iso8601-strict iso8601-strict-local rfc-local rfc2822-local short short-local raw human unix format: default default-local" -x
complete -c git -n '__fish_git_using_command log' -l encoding -a '(__fish_print_encodings)' -x complete -c git -n '__fish_git_using_command log' -l encoding -a '(__fish_print_encodings)' -x
complete -c git -n '__fish_git_using_command log' -s c -s m -s r -s t -s u -s z complete -c git -n '__fish_git_using_command log' -s c -s m -s r -s t -s u -s z
@ -2175,7 +2175,7 @@ complete -f -c git -n '__fish_git_using_command config' -l show-origin -d 'Show
complete -f -c git -n '__fish_git_using_command config' -n '__fish_seen_argument get' -l default -d 'Use default value when missing entry' complete -f -c git -n '__fish_git_using_command config' -n '__fish_seen_argument get' -l default -d 'Use default value when missing entry'
### for-each-ref ### for-each-ref
complete -f -c git -n __fish_git_needs_command -a "for-each-ref" -d "Format and output info on each ref" complete -f -c git -n __fish_git_needs_command -a for-each-ref -d "Format and output info on each ref"
complete -f -c git -n '__fish_git_using_command for-each-ref' -l count -d "Limit to n results" complete -f -c git -n '__fish_git_using_command for-each-ref' -l count -d "Limit to n results"
# Any one of --shell, --perl, --python, or --tcl # Any one of --shell, --perl, --python, or --tcl
set -l for_each_ref_interpreters shell perl python tcl set -l for_each_ref_interpreters shell perl python tcl

View file

@ -2,14 +2,14 @@ complete -c hostnamectl -f
set -l __hostnamectl_version $(hostnamectl --version &| string match -rg 'systemd (\d+).*') set -l __hostnamectl_version $(hostnamectl --version &| string match -rg 'systemd (\d+).*')
if test "$__hostnamectl_version" -lt 249 if test "$__hostnamectl_version" -lt 249
complete -c hostnamectl -n "__fish_use_subcommand" -xa "status\t'Show hostname and related info' complete -c hostnamectl -n __fish_use_subcommand -xa "status\t'Show hostname and related info'
set-hostname\t'Set hostname' set-hostname\t'Set hostname'
set-icon-name\t'Set icon name' set-icon-name\t'Set icon name'
set-chassis\t'Set chassis type' set-chassis\t'Set chassis type'
set-deployment\t'Set deployment environment' set-deployment\t'Set deployment environment'
set-location\t'Set location'" set-location\t'Set location'"
else else
complete -c hostnamectl -n "__fish_use_subcommand" -xa "status\t'Show hostname and related info' complete -c hostnamectl -n __fish_use_subcommand -xa "status\t'Show hostname and related info'
hostname\t'Get or set hostname' hostname\t'Get or set hostname'
icon-name\t'Get or set icon name' icon-name\t'Get or set icon name'
chassis\t'Get or set chassis type' chassis\t'Get or set chassis type'

View file

@ -4,9 +4,9 @@ function __fish_print_console_keymaps
# or which keymaps it can find. localectl can list keymaps, but is part of # or which keymaps it can find. localectl can list keymaps, but is part of
# systemd, which we shouldn't depend on. # systemd, which we shouldn't depend on.
set -l dirs '/usr/share/kbd/keymaps' '/usr/share/keymaps' '/usr/lib/kbd/keymaps' '/lib/kbd/keymaps' '/usr/src/linux/drivers' set -l dirs /usr/share/kbd/keymaps /usr/share/keymaps /usr/lib/kbd/keymaps /lib/kbd/keymaps /usr/src/linux/drivers
path filter -f $dirs/** | string replace -rf '.*/(.*)\.k?map(|\..*)$' '$1' path filter -f $dirs/** | string replace -rf '.*/(.*)\.k?map(|\..*)$' '$1'
end end
complete -fc loadkeys -a "(__fish_print_console_keymaps)" complete -fc loadkeys -a "(__fish_print_console_keymaps)"

View file

@ -4,15 +4,15 @@ set --local sub_commands fn help info repo widget
set --local options best-match cheatsh finder fzf-overrides fzf-overrides-var help path print query tag-rules tldr version set --local options best-match cheatsh finder fzf-overrides fzf-overrides-var help path print query tag-rules tldr version
# subcommands # subcommands
complete navi -n "not __fish_seen_subcommand_from $sub_commands && \ complete navi -n "not __fish_seen_subcommand_from $sub_commands && \
not __fish_contains_opt -s h -s p -s q -s V $options" -a "$sub_commands" not __fish_contains_opt -s h -s p -s q -s V $options" -a "$sub_commands"
set --local internal_functions "url::open welcome widget::last_command map::expand" set --local internal_functions "url::open welcome widget::last_command map::expand"
complete navi -n "__fish_seen_subcommand_from fn && not __fish_seen_subcommand_from $internal_functions" \ complete navi -n "__fish_seen_subcommand_from fn && not __fish_seen_subcommand_from $internal_functions" \
-k -a $internal_functions -k -a $internal_functions
set --local supported_shells "bash zsh fish elvish" set --local supported_shells "bash zsh fish elvish"
complete navi -n "__fish_seen_subcommand_from widget && not __fish_seen_subcommand_from $supported_shells" -k -a $supported_shells complete navi -n "__fish_seen_subcommand_from widget && not __fish_seen_subcommand_from $supported_shells" -k -a $supported_shells
# options # options
complete navi -n "not __fish_seen_subcommand_from $sub_commands" -l best-match -d "Returns the best match" complete navi -n "not __fish_seen_subcommand_from $sub_commands" -l best-match -d "Returns the best match"

View file

@ -6,7 +6,7 @@ complete -c reflector -l download-timeout -d 'The number of seconds to wait befo
complete -c reflector -l list-countries -d 'Display a table of the distribution of servers by country' complete -c reflector -l list-countries -d 'Display a table of the distribution of servers by country'
complete -c reflector -l cache-timeout -d 'The cache timeout in seconds for the data retrieved from the Arch Linux Mirror Status API' complete -c reflector -l cache-timeout -d 'The cache timeout in seconds for the data retrieved from the Arch Linux Mirror Status API'
complete -c reflector -l url -d 'The URL from which to retrieve the mirror data in JSON format' complete -c reflector -l url -d 'The URL from which to retrieve the mirror data in JSON format'
complete -c reflector -l save -d 'Save the mirrorlist to the given path' complete -c reflector -l save -d 'Save the mirrorlist to the given path'
complete -c reflector -l sort -d 'Sort the mirrorlist' -xa 'age rate country score delay' complete -c reflector -l sort -d 'Sort the mirrorlist' -xa 'age rate country score delay'
complete -c reflector -l threads -d 'The number of threads to use for downloading' complete -c reflector -l threads -d 'The number of threads to use for downloading'
complete -c reflector -l verbose -d 'Print extra information' complete -c reflector -l verbose -d 'Print extra information'
@ -27,4 +27,3 @@ complete -c reflector -l completion-percent -d 'Set the minimum completion perce
complete -c reflector -l isos -d 'Only return mirrors that host ISOs' complete -c reflector -l isos -d 'Only return mirrors that host ISOs'
complete -c reflector -l ipv4 -d 'Only return mirrors that support IPv4' complete -c reflector -l ipv4 -d 'Only return mirrors that support IPv4'
complete -c reflector -l ipv6 -d 'Only return mirrors that support IPv6' complete -c reflector -l ipv6 -d 'Only return mirrors that support IPv6'

View file

@ -17,25 +17,25 @@ function __resolvectl_classes
end end
function __resolvectl_commands function __resolvectl_commands
printf "%b\n" "query\tResolve domain names or IP addresses"\ printf "%b\n" "query\tResolve domain names or IP addresses" \
"service\tResolve service records"\ "service\tResolve service records" \
"openpgp\tQuery PGP keys for email"\ "openpgp\tQuery PGP keys for email" \
"tlsa\tQuery TLS public keys"\ "tlsa\tQuery TLS public keys" \
"status\tShow current DNS settings"\ "status\tShow current DNS settings" \
"statistics\tShow resolver statistics"\ "statistics\tShow resolver statistics" \
"reset-statistics\tReset statistics counters"\ "reset-statistics\tReset statistics counters" \
"flush-caches\tFlush DNS RR caches"\ "flush-caches\tFlush DNS RR caches" \
"reset-server-features\tFlushe all feature level information"\ "reset-server-features\tFlushe all feature level information" \
"dns\tSet per-interface DNS servers"\ "dns\tSet per-interface DNS servers" \
"domain\tSet per-interface search or routing domains"\ "domain\tSet per-interface search or routing domains" \
"default-route\tSet per-interface default route flag"\ "default-route\tSet per-interface default route flag" \
"llmnr\tSet per-interface LLMNR settings"\ "llmnr\tSet per-interface LLMNR settings" \
"mdns\tSet per-interface MulticastDNS settings"\ "mdns\tSet per-interface MulticastDNS settings" \
"dnssec\tSet per-interface DNSSEC settings"\ "dnssec\tSet per-interface DNSSEC settings" \
"dnsovertls\tSet per-interface DNS-over-TLS settings"\ "dnsovertls\tSet per-interface DNS-over-TLS settings" \
"nta\tSet per-interface DNSSEC NTA domains"\ "nta\tSet per-interface DNSSEC NTA domains" \
"revert\tRevert the per-interface DNS configuration"\ "revert\tRevert the per-interface DNS configuration" \
"log-level\tSet the log-level" "log-level\tSet the log-level"
end end
# variables # variables

View file

@ -8,37 +8,37 @@ end
complete -c toot -f complete -c toot -f
# # Subcommands # # Subcommands
complete -c toot -a activate -n "__fish_is_first_token" -d 'Switch between accounts.' complete -c toot -a activate -n __fish_is_first_token -d 'Switch between accounts.'
complete -c toot -a auth -n "__fish_is_first_token" -d 'Show logged in accounts and instances' complete -c toot -a auth -n __fish_is_first_token -d 'Show logged in accounts and instances'
complete -c toot -a instance -n "__fish_is_first_token" -d 'Display instance details' complete -c toot -a instance -n __fish_is_first_token -d 'Display instance details'
complete -c toot -a login -n "__fish_is_first_token" -d 'Log in using your browser' complete -c toot -a login -n __fish_is_first_token -d 'Log in using your browser'
complete -c toot -a login_cli -n "__fish_is_first_token" -d 'Log in from the console' complete -c toot -a login_cli -n __fish_is_first_token -d 'Log in from the console'
complete -c toot -a logout -n "__fish_is_first_token" -d 'Log out' complete -c toot -a logout -n __fish_is_first_token -d 'Log out'
complete -c toot -a notifications -n "__fish_is_first_token" -d 'Show notifications' complete -c toot -a notifications -n __fish_is_first_token -d 'Show notifications'
complete -c toot -a post -n "__fish_is_first_token" -d 'Post a status text' complete -c toot -a post -n __fish_is_first_token -d 'Post a status text'
complete -c toot -a search -n "__fish_is_first_token" -d 'Search for users or hashtags' complete -c toot -a search -n __fish_is_first_token -d 'Search for users or hashtags'
complete -c toot -a thread -n "__fish_is_first_token" -d 'Show toot thread items' complete -c toot -a thread -n __fish_is_first_token -d 'Show toot thread items'
complete -c toot -a timeline -n "__fish_is_first_token" -d 'Show recent items' complete -c toot -a timeline -n __fish_is_first_token -d 'Show recent items'
complete -c toot -a tui -n "__fish_is_first_token" -d 'Toot terminal user interface' complete -c toot -a tui -n __fish_is_first_token -d 'Toot terminal user interface'
complete -c toot -a upload -n "__fish_is_first_token" -d 'Upload a file' complete -c toot -a upload -n __fish_is_first_token -d 'Upload a file'
complete -c toot -a whoami -n "__fish_is_first_token" -d 'Display user details' complete -c toot -a whoami -n __fish_is_first_token -d 'Display user details'
complete -c toot -a whois -n "__fish_is_first_token" -d 'Display account details' complete -c toot -a whois -n __fish_is_first_token -d 'Display account details'
complete -c toot -a delete -n "__fish_is_first_token" -d 'Delete a status' complete -c toot -a delete -n __fish_is_first_token -d 'Delete a status'
complete -c toot -a favourite -n "__fish_is_first_token" -d 'Favourite a status' complete -c toot -a favourite -n __fish_is_first_token -d 'Favourite a status'
complete -c toot -a pin -n "__fish_is_first_token" -d 'Pin a status' complete -c toot -a pin -n __fish_is_first_token -d 'Pin a status'
complete -c toot -a reblog -n "__fish_is_first_token" -d 'Reblog a status' complete -c toot -a reblog -n __fish_is_first_token -d 'Reblog a status'
complete -c toot -a reblogged_by -n "__fish_is_first_token" -d 'Show rebloggers of status' complete -c toot -a reblogged_by -n __fish_is_first_token -d 'Show rebloggers of status'
complete -c toot -a unfavourite -n "__fish_is_first_token" -d 'Unfavourite a status' complete -c toot -a unfavourite -n __fish_is_first_token -d 'Unfavourite a status'
complete -c toot -a unpin -n "__fish_is_first_token" -d 'Unpin a status' complete -c toot -a unpin -n __fish_is_first_token -d 'Unpin a status'
complete -c toot -a unreblog -n "__fish_is_first_token" -d 'Unreblog a status' complete -c toot -a unreblog -n __fish_is_first_token -d 'Unreblog a status'
# Accounts # Accounts
complete -c toot -a follow -n "__fish_is_first_token" -d 'Follow an account' complete -c toot -a follow -n __fish_is_first_token -d 'Follow an account'
complete -c toot -a unfollow -n "__fish_is_first_token" -d 'Unfollow an account' complete -c toot -a unfollow -n __fish_is_first_token -d 'Unfollow an account'
complete -c toot -a mute -n "__fish_is_first_token" -d 'Mute an account' complete -c toot -a mute -n __fish_is_first_token -d 'Mute an account'
complete -c toot -a unmute -n "__fish_is_first_token" -d 'Unmute an account' complete -c toot -a unmute -n __fish_is_first_token -d 'Unmute an account'
complete -c toot -a block -n "__fish_is_first_token" -d 'Block an account' complete -c toot -a block -n __fish_is_first_token -d 'Block an account'
complete -c toot -a unblock -n "__fish_is_first_token" -d 'Unblock an account' complete -c toot -a unblock -n __fish_is_first_token -d 'Unblock an account'
# Parameters common to all subcommands # Parameters common to all subcommands
complete -c toot -n "__fish_seen_subcommand_from $_sub_commands" -l debug -d 'show debug log' complete -c toot -n "__fish_seen_subcommand_from $_sub_commands" -l debug -d 'show debug log'

View file

@ -13,7 +13,7 @@ if touch --version 2>/dev/null >/dev/null # GNU
# TODO these may require that = but builtin complete doesn't seem to infer it should # TODO these may require that = but builtin complete doesn't seem to infer it should
# use = here # use = here
complete touch -l time -x -d "change specified kind of timestamp" -a \ complete touch -l time -x -d "change specified kind of timestamp" -a \
"atime\t'change access time (atime) only' "atime\t'change access time (atime) only'
access\t'change access time (atime) only' access\t'change access time (atime) only'
use\t'change access time (atime) only' use\t'change access time (atime) only'
mtime\t'change modification time (mtime) only' mtime\t'change modification time (mtime) only'