scripts/dav-bash-completion.bash@1e8592657a01
scripts/dav-bash-completion.bash
Thu, 28 Jun 2018 16:52:54 +0200
- author
- Olaf Wintermann <olaf.wintermann@gmail.com>
- date
- Thu, 28 Jun 2018 16:52:54 +0200
- changeset 431
- 1e8592657a01
- child 434
-
bc173bae3caa
- permissions
- -rw-r--r--
adds semi-functional bash completion
dav_completion() {
OUT=$( /export/home/olaf/Projekte/dav/build/dav complete $COMP_CWORD "${COMP_WORDS[@]}" )
CMD_RES=$?
if [ $CMD_RES == 10 ]; then
compopt -o nospace
fi
if [ $CMD_RES == 12 ]; then
compopt -o default
COMPREPLY=()
else
TMP_IFS=$IFS
IFS='
'
COMPREPLY=( $OUT )
IFS=$TMP_IFS
fi
}