The following commit has been merged in the master branch:
commit 21663725eaf238713f612e9756d531433a7bb1ff
Author: Raphaël Droz <[email protected]>
Date: Mon Jun 13 14:33:18 2011 +0200
handle properly long-options in sitecopy(1).
diff --git a/completions/sitecopy b/completions/sitecopy
index f713985..6c0db01 100644
--- a/completions/sitecopy
+++ b/completions/sitecopy
@@ -7,8 +7,8 @@ have sitecopy || return
_sitecopy()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword split
+ _init_completion -s || return
case $prev in
--debug|-d)
@@ -31,22 +31,21 @@ _sitecopy()
--*)
COMPREPLY=( $( compgen -W "$(_parse_help $1)" -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
+ return 0
;;
# only complete long options
-)
compopt -o nospace
COMPREPLY=( -- )
- ;;
-
- *)
- if [ -r ~/.sitecopyrc ]; then
- COMPREPLY=( $( compgen -W "$($1 -v | \
- command sed -n '/^Site:/s/Site: //p')" -- "$cur" ) )
- fi
+ return 0
;;
esac
+ if [ -r ~/.sitecopyrc ]; then
+ COMPREPLY=( $( compgen -W "$($1 -v | \
+ command sed -n '/^Site:/s/Site: //p')" -- "$cur" ) )
+ fi
return 0
} &&
complete -F _sitecopy -o default sitecopy
--
bash-completion
_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-commits