Merge pull request #5923 from oxiedi/update-shell-completions_1.1.17

Update shell completions to 1.1.17
This commit is contained in:
TW 2021-10-08 07:24:14 +02:00 committed by GitHub
commit edc1cdf74b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 7 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 --stdin-user --stdin-group --stdin-mode -e --exclude --exclude-from --pattern --patterns-from --exclude-caches --exclude-if-present --keep-exclude-tags --keep-tag-files --exclude-nodump -x --one-file-system --numeric-owner --noatime --noctime --nobirthtime --nobsdflags --ignore-inode --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 --stdin-user --stdin-group --stdin-mode -e --exclude --exclude-from --pattern --patterns-from --exclude-caches --exclude-if-present --keep-exclude-tags --keep-tag-files --exclude-nodump -x --one-file-system --numeric-owner --noatime --noctime --nobirthtime --nobsdflags --noacls --noxattrs --ignore-inode --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 --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 -P --prefix -a --glob-archives --sort-by --first --last ${common_opts}"
@ -89,7 +89,7 @@ _borg()
local opts="--short --list-format --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

@ -120,8 +120,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 'ignore-inode' -d 'Ignore inode data in file metadata cache' -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
@ -138,6 +140,8 @@ complete -c borg -f -l 'list' -d 'Print verbose list of it
complete -c borg -f -s n -l 'dry-run' -d 'Do not actually extract any files' -n "__fish_seen_subcommand_from 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 '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
@ -186,6 +190,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

@ -1,6 +1,6 @@
#compdef borg borgfs -P -value-,BORG_*,-default-
# Zsh completion for Borg Backup 1.1.15.
# Zsh completion for Borg Backup 1.1.17.
#
# Recommended _borg specific settings:
#
@ -146,8 +146,10 @@ _borg-create() {
'--noctime[do not store ctime into archive]' \
'--nobirthtime[do not store birthtime (creation date) into archive]' \
'--nobsdflags[do not read and store bsdflags (e.g. NODUMP, IMMUTABLE) into archive]' \
'--noacls[do not read and store ACLs into archive]' \
'--noxattrs[do not read and store xattrs into archive]' \
'--ignore-inode[ignore inode data in the file metadata cache used to detect unchanged files]' \
'--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' \
@ -180,6 +182,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
@ -245,6 +248,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 \
@ -291,6 +300,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' \
@ -325,6 +335,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[do not extract/set bsdflags (e.g. NODUMP, IMMUTABLE)]' \
'--noacls[do not extract/set ACLs]' \
'--noxattrs[do not extract/set xattrs]' \
'--stdout[write all extracted data to stdout]' \
'--sparse[create holes in output sparse file from all-zero chunks]' \
$common_exclude_extract_options \
@ -759,6 +771,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 -n 1 compadd - basesyncfile && ret=0
;;