Skip to content

Commit a4761f9

Browse files
zsh: no barchive, add --repo
1 parent 7e78aaf commit a4761f9

File tree

1 file changed

+5
-5
lines changed
  • scripts/shell_completions/zsh

1 file changed

+5
-5
lines changed

scripts/shell_completions/zsh/_borg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,9 +1020,9 @@ _borg_archive() {
10201020
local fmt descfmt name desc
10211021
zstyle -s ":completion:${curcontext}:archives" archive-description-format descfmt ||
10221022
descfmt='{id:.8} {time} {archive:<15} {tags:<10} {username:<10} {hostname:<10} {comment:.40}'
1023-
fmt="{barchive}{NUL}$descfmt{NUL}"
1023+
fmt="{archive}{NUL}$descfmt{NUL}"
10241024
_call_program -p archive-descriptions \
1025-
${(q)__borg_command:-borg} repo-list --format=${(q)fmt} ${(q)sort_by} $archive_filters $qrepo 2>/dev/null |
1025+
${(q)__borg_command:-borg} repo-list --format=${(q)fmt} ${(q)sort_by} $archive_filters --repo $qrepo 2>/dev/null |
10261026
while IFS= read -r -d $'\0' name && IFS= read -r -d $'\0' descr; do
10271027
__borg_archive_names[1,0]=( $name )
10281028
__borg_archive_descriptions[1,0]=( "$descr" )
@@ -1037,9 +1037,9 @@ _borg_archive() {
10371037
disp+=( -ld __borg_archive_descriptions )
10381038
else
10391039
typeset -gHa __borg_archive_names=()
1040-
local fmt='{barchive}{NUL}'
1040+
local fmt='{archive}{NUL}'
10411041
__borg_archive_names=( ${(@0aO)"$(_call_program -p archives \
1042-
${(q)__borg_command:-borg} repo-list --format=${(q)fmt} ${(q)sort_by} $archive_filters $qrepo 2>/dev/null)"} )
1042+
${(q)__borg_command:-borg} repo-list --format=${(q)fmt} ${(q)sort_by} $archive_filters --repo $qrepo 2>/dev/null)"} )
10431043
(( $pipestatus[1] )) && {
10441044
_message "couldn't list repository: ${(Q)qrepo}"
10451045
return 1
@@ -1105,7 +1105,7 @@ _borg_format_keys() {
11051105
local archive=${(Q)1}
11061106

11071107
local -a keys=( NEWLINE NL NUL SPACE TAB CR LF )
1108-
local -a repository_keys=( archive name barchive comment bcomment id start time end command_line hostname username )
1108+
local -a repository_keys=( archive name comment bcomment id start time end command_line hostname username )
11091109
local -a archive_keys=( type mode uid gid user group path bpath source linktarget flags size csize dsize dcsize
11101110
num_chunks unique_chunks mtime ctime atime isomtime isoctime isoatime blake2b blake2s md5 sha1 sha224 sha256 sha384
11111111
sha3_224 sha3_256 sha3_384 sha3_512 sha512 shake_128 shake_256 archiveid archivename extra health )

0 commit comments

Comments
 (0)