]> git.pld-linux.org Git - packages/zsh.git/blob - zsh-completions.patch
- 4.2.0
[packages/zsh.git] / zsh-completions.patch
1 diff -ruN zsh-4.2.0./Completion/Unix/Command/.distfiles zsh-4.2.0/Completion/Unix/Command/.distfiles
2 --- zsh-4.2.0./Completion/Unix/Command/.distfiles       2004-03-12 17:46:08.000000000 +0100
3 +++ zsh-4.2.0/Completion/Unix/Command/.distfiles        2004-03-27 16:45:23.063820448 +0100
4 @@ -24,5 +24,5 @@
5  _mt           _mtr          _nice         _nmap
6  _perforce     _printenv     _python       _raggle       _rar         _renice
7  _sablotron    _screen       _sed          _subversion   _tla
8 -_uniq         _vorbis       _vux          _wiggle       _xmlsoft
9 +_uniq         _vorbis       _vux          _wiggle       _xmlsoft      _sms
10  '
11 diff -ruN zsh-4.2.0./Completion/Unix/Command/_sms zsh-4.2.0/Completion/Unix/Command/_sms
12 --- zsh-4.2.0./Completion/Unix/Command/_sms     1970-01-01 01:00:00.000000000 +0100
13 +++ zsh-4.2.0/Completion/Unix/Command/_sms      2004-03-27 16:45:03.001870328 +0100
14 @@ -0,0 +1,61 @@
15 +#compdef sms smsaddr
16 +
17 +# Copyright (c) 2002 GoTaR <gotar@priv0.onet.pl>
18 +
19 +#_sms_aliases0 () {
20 +##     compadd "$@" $(print ${(f)"$(smsaddr -l | cut -f1)"})
21 +#      local smsas
22 +#      smsas=(`smsaddr -l | perl -ne 's/       +/:/; if (/^'$PREFIX'/) {print} else {if (/:'$PREFIX'/) {/^(.*):(.*)$/; print "$2:$1 "}}'`)
23 +#      _describe "SMS alias" "smsas"
24 +#}
25 +
26 +_sms_aliases () {
27 +       local smsas
28 +       smsas=(${(f)"$(smsaddr -l)"})
29 +       smsas=(${smsas/ ##/:})
30 +if [[ -n "$PREFIX$SUFFIX" ]]; then
31 +       smsas=($smsas ${smsas/(#s)(#b)(^($PREFIX)*):(*)(#e)/$match[3]:$match[1]})
32 +fi
33 +#      smsas=(${(M)smsas:#$PREFIX*})
34 +       _describe "SMS alias" smsas
35 +}
36 +
37 +_sms_alias () {
38 +       local smsas
39 +       smsas=(${(f)"$(smsaddr -l)"})
40 +       smsas=(${smsas/ ##/:})
41 +       _describe "SMS alias" smsas
42 +}
43 +
44 +#_sms_aliases1 () {
45 +#smsaddr -l | while read alias number; do
46 +#      if [[ $alias == $PREFIX*$SUFFIX || $number == $PREFIX*$SUFFIX ]]; then
47 +#              compadd -U -- $alias
48 +#      fi
49 +#done
50 +#}            
51 +
52 +case "$service" in
53 +sms)
54 +       _arguments \
55 +               '1:SMS alias or number:_sms_aliases' \
56 +               ':message:_guard' \
57 +               '--split[split to max n messages]:number of messages:(2 5 9)' \
58 +               '--supersms[send via SuperSMS.pl gateway]' \
59 +               '--czat[send via Idea.czat gateway]' \
60 +               '--dlogin[login for Idea.czat]:login:_guard' \
61 +               '--pf[send via Panorama Firm gateway]' \
62 +               '--plusmail[send message to PlusGSM network via e-mail gateway, not www]' \
63 +               '--cfg[config file]:config file:_files' \
64 +               '--check[check for the new version of this program]' \
65 +               '--from[sender e-mail adress for PlusGSM and Idea gateways]:e-mail:_guard' \
66 +               '--ip[sender IP]:IP:_guard' \
67 +               '--sign[set signature]:signature:_guard' \
68 +               '--thanksto'
69 +       ;;
70 +smsaddr)
71 +       _arguments \
72 +               '(-r -l)-a[add new entry]:New entry name:_guard:Phone number:_guard' \
73 +               '(-a -l)-r[remove existing entry]:SMS alias:_sms_alias' \
74 +               '(-a -r)-l[list entry]:SMS alias:_sms_alias'
75 +esac
This page took 0.073599 seconds and 4 git commands to generate.