diff -ruN zsh-4.0.6./Completion/Unix/Command/.distfiles zsh-4.0.6/Completion/Unix/Command/.distfiles --- zsh-4.1.1.orig/Completion/Unix/Command/.distfiles Fri Aug 9 15:30:12 2002 +++ zsh-4.1.1/Completion/Unix/Command/.distfiles Mon Apr 21 17:46:39 2003 @@ -20,5 +20,5 @@ _netcat _larch _texinfo _figlet _elinks _tidy _global _global_tags _ant _lsof _mt _xmlsoft _perforce _python _antiword _screen _renice -_ecasound _gpg +_ecasound _gpg _sms ' diff -ruN zsh-4.0.6./Completion/Unix/Command/_sms zsh-4.0.6/Completion/Unix/Command/_sms --- zsh-4.1.1.orig/Completion/Unix/Command/_sms Thu Jan 1 01:00:00 1970 +++ zsh-4.1.1/Completion/Unix/Command/_sms Fri Apr 4 20:17:13 2003 @@ -0,0 +1,61 @@ +#compdef sms smsaddr + +# Copyright (c) 2002 GoTaR + +#_sms_aliases0 () { +## compadd "$@" $(print ${(f)"$(smsaddr -l | cut -f1)"}) +# local smsas +# smsas=(`smsaddr -l | perl -ne 's/ +/:/; if (/^'$PREFIX'/) {print} else {if (/:'$PREFIX'/) {/^(.*):(.*)$/; print "$2:$1 "}}'`) +# _describe "SMS alias" "smsas" +#} + +_sms_aliases () { + local smsas + smsas=(${(f)"$(smsaddr -l)"}) + smsas=(${smsas/ ##/:}) +if [[ -n "$PREFIX$SUFFIX" ]]; then + smsas=($smsas ${smsas/(#s)(#b)(^($PREFIX)*):(*)(#e)/$match[3]:$match[1]}) +fi +# smsas=(${(M)smsas:#$PREFIX*}) + _describe "SMS alias" smsas +} + +_sms_alias () { + local smsas + smsas=(${(f)"$(smsaddr -l)"}) + smsas=(${smsas/ ##/:}) + _describe "SMS alias" smsas +} + +#_sms_aliases1 () { +#smsaddr -l | while read alias number; do +# if [[ $alias == $PREFIX*$SUFFIX || $number == $PREFIX*$SUFFIX ]]; then +# compadd -U -- $alias +# fi +#done +#} + +case "$service" in +sms) + _arguments \ + '1:SMS alias or number:_sms_aliases' \ + ':message:_guard' \ + '--split[split to max n messages]:number of messages:(2 5 9)' \ + '--supersms[send via SuperSMS.pl gateway]' \ + '--czat[send via Idea.czat gateway]' \ + '--dlogin[login for Idea.czat]:login:_guard' \ + '--pf[send via Panorama Firm gateway]' \ + '--plusmail[send message to PlusGSM network via e-mail gateway, not www]' \ + '--cfg[config file]:config file:_files' \ + '--check[check for the new version of this program]' \ + '--from[sender e-mail adress for PlusGSM and Idea gateways]:e-mail:_guard' \ + '--ip[sender IP]:IP:_guard' \ + '--sign[set signature]:signature:_guard' \ + '--thanksto' + ;; +smsaddr) + _arguments \ + '(-r -l)-a[add new entry]:New entry name:_guard:Phone number:_guard' \ + '(-a -l)-r[remove existing entry]:SMS alias:_sms_alias' \ + '(-a -r)-l[list entry]:SMS alias:_sms_alias' +esac