mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 18:28:42 +00:00
Merge pull request #3596 from balvik/master
Fixed tab completion problem in Bash
This commit is contained in:
commit
181da5615e
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
_borg()
|
_borg()
|
||||||
{
|
{
|
||||||
|
compopt -o default
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
@ -18,6 +19,7 @@ _borg()
|
||||||
if [[ ${COMP_CWORD} == 1 ]] ; then
|
if [[ ${COMP_CWORD} == 1 ]] ; then
|
||||||
local borg_commands="init create extract check rename list diff delete prune info mount umount key serve upgrade recreate export-tar with-lock break-lock benchmark config"
|
local borg_commands="init create extract check rename list diff delete prune info mount umount key serve upgrade recreate export-tar with-lock break-lock benchmark config"
|
||||||
COMPREPLY=( $(compgen -W "${borg_commands}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${borg_commands}" -- ${cur}) )
|
||||||
|
compopt +o default
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -159,7 +161,6 @@ _borg()
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMPREPLY=( $(compgen -f ${cur}) )
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue