David Paleino 9cbd3ceab2 - add more completions to aptitude (Closes: #432289)
- fixed UTF-8 problem with _get_cword(), thanks to
    Andrei Paskevich (Closes: #472132)
  - fixed autoremove completion, thanks to Flavio Visentin
    (Closes: #474974)
  - cmf and CMF added to playmidi completion (Closes: #365658)
  - added rrdtool completion, thanks to Justin Pryzby (Closes: #428641)
  - added OpenDocument completion for unzip/zipinfo (.od{f,g,p,s,t})
    (Closes: #472940)
2008-05-10 18:04:06 +02:00

31 lines
735 B
Plaintext

# sitecopy(1) completion
# Copyright 2003 Eelco Lempsink <eelcolempsink@gmx.net>
# License: GNU GPL v2 or later
#
# $Id: sitecopy,v 1.3 2005/01/03 02:44:22 ianmacd Exp $
_sitecopy()
{
local cur
COMPREPLY=()
cur=`_get_cword`
case "$cur" in
--*)
COMPREPLY=( $( compgen -W "$(sitecopy -h | grep -e '--\w' | awk '{sub (/=(FILE|PATH)/, "", $2); print $2}')" -- $cur ) )
;;
-*)
COMPREPLY=( $( compgen -W "$(sitecopy -h | grep -e '-\w' | awk '{sub (",", "", $1); print $1}')" -- $cur ) )
;;
*)
if [ -r ~/.sitecopyrc ]; then
COMPREPLY=( $( compgen -W "$(grep '^["$'\t '"]*site' ~/.sitecopyrc | awk '{print $2}')" -- $cur ) )
fi
;;
esac
return 0
}
complete -F _sitecopy -o default sitecopy