Update shell completions to 1.1.17

This commit is contained in:
TW 2021-10-08 07:24:14 +02:00 committed by KN4CK3R
parent 3ad8dc8bd0
commit 79eba96bba
3 changed files with 31 additions and 6 deletions

View File

@ -42,7 +42,7 @@ _borg()
return 0
;;
'--files-cache')
local files_cache_mode="ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime disabled"
local files_cache_mode="ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime size disabled"
COMPREPLY=( $(compgen -W "${files_cache_mode}" -- ${cur}) )
return 0
;;
@ -75,10 +75,10 @@ _borg()
local opts="-e --encryption --append-only --storage-quota --make-parent-dirs ${common_opts}"
;;
*' create '*)
local opts="-n --dry-run -s --stats --list --filter --json --no-cache-sync --stdin-name --content-from-command -e --exclude --exclude-from --pattern --patterns-from --exclude-caches --exclude-if-present --keep-exclude-tags --exclude-nodump -x --one-file-system --numeric-owner --noatime --noctime --nobirthtime --nobsdflags --noflags --files-cache --read-special --comment --timestamp -c --checkpoint-interval --chunker-params -C --compression ${common_opts}"
local opts="-n --dry-run -s --stats --list --filter --json --no-cache-sync --stdin-name --content-from-command -e --exclude --exclude-from --pattern --patterns-from --exclude-caches --exclude-if-present --keep-exclude-tags --exclude-nodump -x --one-file-system --numeric-owner --noatime --noctime --nobirthtime --nobsdflags --noacls --noxattrs --noflags --files-cache --read-special --comment --timestamp -c --checkpoint-interval --chunker-params -C --compression ${common_opts}"
;;
*' extract '*)
local opts="--list -n --dry-run --numeric-owner --nobsdflags --noflags --stdout --sparse -e --exclude --exclude-from --pattern --patterns-from --strip-components ${common_opts}"
local opts="--list -n --dry-run --numeric-owner --nobsdflags --noacls --noxattrs --stdout --sparse -e --exclude --exclude-from --pattern --patterns-from --strip-components ${common_opts}"
;;
*' check '*)
local opts="--repository-only --archives-only --verify-data --repair --save-space --max-duration -P --prefix -a --glob-archives --sort-by --first --last ${common_opts}"
@ -89,7 +89,7 @@ _borg()
local opts="--short --format --json --json-lines -P --prefix -a --glob-archives --sort-by --first --last -e --exclude --exclude-from --pattern --patterns-from ${common_opts}"
;;
*' diff '*)
local opts="--numeric-owner --same-chunker-params --sort -e --exclude --exclude-from --pattern --patterns-from ${common_opts}"
local opts="--numeric-owner --same-chunker-params --sort --json-lines -e --exclude --exclude-from --pattern --patterns-from ${common_opts}"
;;
*' delete '*)
local opts="-n --dry-run -s --stats --cache-only --force --save-space -P --prefix -a --glob-archives --sort-by --first --last ${common_opts}"

View File

@ -118,8 +118,10 @@ complete -c borg -f -l 'noatime' -d 'Do not store atime'
complete -c borg -f -l 'noctime' -d 'Do not store ctime' -n "__fish_seen_subcommand_from create"
complete -c borg -f -l 'nobirthtime' -d 'Do not store creation date' -n "__fish_seen_subcommand_from create"
complete -c borg -f -l 'nobsdflags' -d 'Do not store bsdflags' -n "__fish_seen_subcommand_from create"
complete -c borg -f -l 'noacls' -d 'Do not read and store ACLs into archive' -n "__fish_seen_subcommand_from create"
complete -c borg -f -l 'noxattrs' -d 'Do not read and store xattrs into archive' -n "__fish_seen_subcommand_from create"
complete -c borg -f -l 'noflags' -d 'Do not store flags' -n "__fish_seen_subcommand_from create"
set -l files_cache_mode "ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime disabled"
set -l files_cache_mode "ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime size disabled"
complete -c borg -f -l 'files-cache' -d 'Operate files cache in MODE' -a "$files_cache_mode" -n "__fish_seen_subcommand_from create"
complete -c borg -f -l 'read-special' -d 'Open device files like regular files' -n "__fish_seen_subcommand_from create"
# Archive options
@ -137,6 +139,8 @@ complete -c borg -f -s n -l 'dry-run' -d 'Do not actually extract
complete -c borg -f -l 'numeric-owner' -d 'Only obey numeric user:group identifiers' -n "__fish_seen_subcommand_from extract"
complete -c borg -f -l 'nobsdflags' -d 'Do not extract/set bsdflags' -n "__fish_seen_subcommand_from extract"
complete -c borg -f -l 'noflags' -d 'Do not extract/set flags' -n "__fish_seen_subcommand_from extract"
complete -c borg -f -l 'noacls' -d 'Do not extract/set ACLs' -n "__fish_seen_subcommand_from extract"
complete -c borg -f -l 'noxattrs' -d 'Do not extract/set xattrs' -n "__fish_seen_subcommand_from extract"
complete -c borg -f -l 'stdout' -d 'Write all extracted data to stdout' -n "__fish_seen_subcommand_from extract"
complete -c borg -f -l 'sparse' -d 'Create holes in output sparse file' -n "__fish_seen_subcommand_from extract"
# Exclusion options
@ -185,6 +189,7 @@ complete -c borg -l 'patterns-from' -d 'Include/exclude paths fr
complete -c borg -f -l 'numeric-owner' -d 'Only consider numeric user:group' -n "__fish_seen_subcommand_from diff"
complete -c borg -f -l 'same-chunker-params' -d 'Override check of chunker parameters' -n "__fish_seen_subcommand_from diff"
complete -c borg -f -l 'sort' -d 'Sort the output lines by file path' -n "__fish_seen_subcommand_from diff"
complete -c borg -f -l 'json-lines' -d 'Format output as JSON Lines' -n "__fish_seen_subcommand_from diff"
# Exclusion options
complete -c borg -s e -l 'exclude' -d 'Exclude paths matching PATTERN' -n "__fish_seen_subcommand_from diff"
complete -c borg -l 'exclude-from' -d 'Read exclude patterns from EXCLUDEFILE' -n "__fish_seen_subcommand_from diff"

View File

@ -154,8 +154,10 @@ _borg-create() {
'--noctime[do not store ctime into archive]' \
'--nobirthtime[do not store birthtime (creation date) into archive]' \
'--nobsdflags[deprecated, use --noflags instead]' \
'--noacls[do not read and store ACLs into archive]' \
'--noxattrs[do not read and store xattrs into archive]' \
'--noflags[do not read and store flags (e.g. NODUMP, IMMUTABLE) into archive]' \
'--files-cache=[operate files cache in MODE. default: ctime,size,inode]:MODE:(ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime disabled)' \
'--files-cache=[operate files cache in MODE. default: ctime,size,inode]:MODE:(ctime,size,inode mtime,size,inode ctime,size mtime,size rechunk,ctime rechunk,mtime size disabled)' \
'--read-special[open and read block and char device files as well as FIFOs as if they were regular files]' \
$common_options \
':ARCHIVE: _borg_repository_or_archive -a -p' \
@ -200,6 +202,7 @@ _borg-debug() {
'put-obj:put object to repository'
'delete-obj:delete object from repository'
'refcount-obj:show refcount for object from repository'
'dump-hints:dump repository hints'
'convert-profile:convert Borg profile to Python profile'
)
_describe -t commands 'command' debug_commands && ret=0
@ -265,6 +268,12 @@ _borg-debug() {
': :_borg_repository' \
'*:ID (hex object):' && ret=0
;;
(dump-hints)
_arguments -s -w -S : \
$common_options \
': :_borg_repository' \
'*:PATH:_files' && ret=0
;;
(convert-profile)
_arguments -s -w -S : \
$common_options \
@ -312,6 +321,7 @@ _borg-diff() {
'--numeric-owner[only obey numeric user and group identifiers]' \
'--same-chunker-params[override check of chunker parameters]' \
'--sort[sort the output lines by file path]' \
'--json-lines[format output as JSON Lines]' \
$common_exclude_options \
$common_options \
':ARCHIVE1: _borg_repository_or_archive -a' \
@ -346,6 +356,8 @@ _borg-extract() {
'(-n --dry-run)'{-n,--dry-run}'[do not actually change any files]' \
'--numeric-owner[only obey numeric user and group identifiers]' \
'--nobsdflags[deprecated, use --noflags instead]' \
'--noacls[do not extract/set ACLs]' \
'--noxattrs[do not extract/set xattrs]' \
'--noflags[do not extract/set flags (e.g. NODUMP, IMMUTABLE)]' \
'--stdout[write all extracted data to stdout]' \
'--sparse[create holes in output sparse file from all-zero chunks]' \
@ -782,6 +794,14 @@ _borg_parameters() {
_description values expl 'value'
compadd "$expl[@]" YES NO && ret=0
;;
(LIBC)
_wanted libraries expl 'library' \
compadd - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) && ret=0
;;
(SELFTEST)
_description values expl 'value'
compadd "$expl[@]" disabled && ret=0
;;
(WORKAROUNDS)
_wanted workarounds expl 'workaround' _sequence compadd - basesyncfile && ret=0
;;