sitecopy: fixed a bug with grep and brackets: use sitecopy -v to fetch sites.

This commit is contained in:
Raphaël Droz 2011-06-11 22:06:36 +02:00 committed by David Paleino
parent c7e26402ca
commit 7bcf9a4f18

View File

@ -20,8 +20,8 @@ _sitecopy()
;; ;;
*) *)
if [ -r ~/.sitecopyrc ]; then if [ -r ~/.sitecopyrc ]; then
COMPREPLY=( $( compgen -W "$(command grep '^["$'\t '"]*site' \ COMPREPLY=( $( compgen -W "$(sitecopy -v | \
~/.sitecopyrc | awk '{print $2}')" -- "$cur" ) ) command sed -n '/^Site:/s/Site: //p')" -- "$cur" ) )
fi fi
;; ;;
esac esac