mirror of https://github.com/digint/btrbk
contrib: bash: completion.bash: add action "extents"
parent
4fa6dfde25
commit
497b4e132e
|
@ -51,7 +51,7 @@ _btrbk()
|
|||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||
else
|
||||
if [[ ! -v 'cmds[0]' ]]; then
|
||||
COMPREPLY=($(compgen -W 'run dryrun snapshot resume prune archive clean stats list usage origin diff ls' -- "$cur"))
|
||||
COMPREPLY=($(compgen -W 'run dryrun snapshot resume prune archive clean stats list usage origin diff extents ls' -- "$cur"))
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -83,6 +83,15 @@ _btrbk()
|
|||
# <path>|<url>...
|
||||
_filedir -d
|
||||
;;
|
||||
'extents')
|
||||
# [diff] <path>... [exclusive] <path>...
|
||||
if [[ ! -v 'cmds[1]' ]]; then
|
||||
COMPREPLY+=($(compgen -W 'diff' -- "$cur"))
|
||||
elif [[ ! ${cmds[*]} =~ (^|[[:space:]])"exclusive"($|[[:space:]]) ]]; then
|
||||
COMPREPLY+=($(compgen -W 'exclusive' -- "$cur"))
|
||||
fi
|
||||
_filedir -d
|
||||
;;
|
||||
esac
|
||||
} && complete -F _btrbk btrbk
|
||||
|
||||
|
|
Loading…
Reference in New Issue