Sun, 11 Aug 2019 08:58:58 +0200
add additional dav-sync push test to check if deleting all files will result in an empty collection
dav_completion() { local davcmd local out local cmd_res davcmd="${COMP_WORDS[0]} complete $COMP_CWORD ${COMP_WORDS[@]}" out=$(eval $davcmd) cmd_res=$? if [ $cmd_res == 10 ]; then compopt -o nospace fi if [ $cmd_res == 12 ]; then compopt -o default COMPREPLY=() else IFS=$'\n' declare -ga 'COMPREPLY=($out)' fi } complete -F dav_completion dav