]> git.pld-linux.org Git - packages/zsh.git/blob - zsh-completions.patch
- updated to 4.0.7
[packages/zsh.git] / zsh-completions.patch
1 diff -ruN zsh-4.0.7./Completion/Unix/Command/.distfiles zsh-4.0.7/Completion/Unix/Command/.distfiles
2 --- zsh-4.0.7./Completion/Unix/Command/.distfiles       Fri Aug  9 15:30:12 2002
3 +++ zsh-4.0.7/Completion/Unix/Command/.distfiles        Mon Apr 21 17:46:39 2003
4 @@ -19,5 +19,5 @@
5  _chkconfig    _cdcd         _irssi       _sccs         _texinfo      _ant
6  _global       _global_tags  _figlet       _ifconfig     _last         _larch
7  _lsof         _mt           _xmlsoft      _elinks       _tidy         _python
8 -_antiword     _renice
9 +_antiword     _renice       _mplayer      _sms
10  '
11 diff -ruN zsh-4.0.7./Completion/Unix/Command/_mplayer zsh-4.0.7/Completion/Unix/Command/_mplayer
12 --- zsh-4.0.7./Completion/Unix/Command/_mplayer Thu Jan  1 01:00:00 1970
13 +++ zsh-4.0.7/Completion/Unix/Command/_mplayer  Fri Apr  4 19:28:32 2003
14 @@ -0,0 +1,112 @@
15 +#compdef mplayer
16 +
17 +# Copyright (c) 2002 GoTaR <gotar@priv0.onet.pl>
18 +
19 +local state
20 +
21 +_vo () {
22 +#      compadd "$@" $(print ${(f)"$(mplayer -vo help 2>/dev/null | cut -f2 -d' ')"})
23 +       local vo
24 +#      vo=(`mplayer -vo help 2>/dev/null | perl -ne 's/^       //; s/  /:/; s/ /ÿ/g; print'`)
25 +       vo=(`mplayer -vo help | perl -ne 's/ /ÿ/g; print if s/^ (\w+)   (.+)$/$1:$2/'`)
26 +       vo=(${vo//ÿ/ })
27 +       _describe "Video output" vo
28 +}
29 +
30 +_ao () {
31 +#      compadd "$@" $(print ${(f)"$(mplayer -ao help 2>/dev/null | cut -f2 -d' ')"})
32 +       local ao
33 +#      ao=(`mplayer -ao help 2>/dev/null | perl -ne 's/^       //; s/  /:/; s/ /ÿ/g; print'`)
34 +       ao=(`mplayer -ao help | perl -ne 's/ /ÿ/g; print if s/^ (\w+)   (.+)$/$1:$2/'`)
35 +       ao=(${ao//ÿ/ })
36 +       _describe "Audio output" ao
37 +}
38 +
39 +# TODO comment to the right
40 +
41 +_vc () {
42 +       local vc
43 +       vc=(`mplayer -vc help | perl -ne 'unless (/:/) {s/ +/ÿ/g; s/(\w+?)ÿ(\w+?)ÿ(\w+?)ÿ(.*)/$1:$4ÿ($2,ÿ$3)/; print}'`)
44 +       vc=(${vc//ÿ/ })
45 +       _describe "Video codecs" vc
46 +}
47 +
48 +_ac () {
49 +       local ac
50 +       ac=(`mplayer -ac help | perl -ne 'unless (/:/) {s/ +/ÿ/g; s/(\w+?)ÿ(\w+?)ÿ(\w+?)ÿ(.*)/$1:$4ÿ($2,ÿ$3)/; print}'`)
51 +       ac=(${ac//ÿ/ })
52 +       _describe "Audio codecs" ac
53 +}
54 +
55 +_vop () {
56 +       local vop
57 +       vop=(`mplayer -vf help | perl -ne 's/ +: /:/g; s/ /_/g; print if s/^__(\w+):(.+)$/$1\[$2\]/'`)
58 +       vop=(${vop//_/ })
59 +       _values -s , "Video filters" "$vop[@]"
60 +}
61 +
62 +_plugins () {
63 +       _values -s , "Audio output plugins" resample surround format volume extrastereo volnorm delay
64 +}
65 +
66 +_mul_coefficient () {
67 +       _values -s : "coefficient" "-1[swap channels]" "0[mono]" "1[normal]" "2.5[default]" "4[high]"
68 +}
69 +
70 +_aop () {
71 +       local opts
72 +       opts=("fout[output frequency (Hz) - resample plugin]:frequency [Hz]:(21000 44100 48000)"
73 +               "format[output format - format plugin]:format:_guard"
74 +               "volume[volume level - volume plugin]:volume:(0 050 100 150 200 255)"
75 +               "softclip[compressor - volume plugin]"
76 +               "mul[coefficient - extrastereo plugin]:coefficient:_mul_coefficient"
77 +               "delay[delay sound - delay plugin]:delay:(1 3 5)"
78 +       )
79 +       _values -s : "Audio output plugins options" "list[list of plugins]:::_plugins" "$opts[@]"
80 +}
81 +
82 +_osdlevel () {
83 +       local osds
84 +       osds=(0:none 1:volume+seek 2:volume+seek+timer+percentage 3:volume+seek+timer+percentage+total)
85 +       _describe "OSD level" osds
86 +}
87 +
88 +_icelayer () {
89 +       local icelays
90 +       icelays=(0:Desktop 2:Below 4:Normal 6:OnTop 8:Dock 10:AboveDock 12:Menu)
91 +       _describe "IceWM layer" icelays
92 +}
93 +
94 +_arguments \
95 +       '-quiet' \
96 +       '-osdlevel[OSD startpoint]:OSD level:_osdlevel' \
97 +       '(-rootwin)-icelayer:icelayer:_icelayer' \
98 +       '(-icelayer)-rootwin[play in root window]' \
99 +       '(-ao -aop)-nosound[disable sound]' \
100 +       '(-nosound)-ao[audio output]:audio output:_ao' \
101 +       '(-nosound)*-aop[audio output filter]:audio output filter:_aop' \
102 +       '-vo[video output]:video output:_vo' \
103 +       '*-vf[video output filters]:video output filters:_vop' \
104 +       '-vc[video codecs]:video codec:_vc' \
105 +       '-ac[audio codecs]:audio codec:_ac' \
106 +       '-flip[flip image]' \
107 +       '-fs[enable fullscreen]' \
108 +       '-zoom[enable software zoom]' \
109 +       '-framedrop[enable frame dropping]' \
110 +       '-hardframedrop[enable more intense frame dropping]' \
111 +       '-double[enable doublebuffering]' \
112 +       '-nobps[use interleave sync]' \
113 +       '-ni[non-interleaved]' \
114 +       '-idx[rebuild index]' \
115 +       '-forceidx[force rebuilding of index]' \
116 +       '(-nocache)-cache[cache size]:cache size:(1024 2048 4096 8192)' \
117 +       '(-cache)-nocache[don'\''t use cache]' \
118 +       '-noautosub[disable automatic subtitles]' \
119 +       '*-sub[subtitles]:subtitles:_files -/ -g \*.\(\#i\)txt' \
120 +       '*:mfiles:->mfiles' && return 0
121 +
122 +case "$state" in
123 +       mfiles) _arguments \
124 +               '*:multimedia file:_files -/ -g \*.\(\#i\)\(mp3\|mpg\|mpe\|mpeg\|m1v\|avi\|asf\|wma\|wmv\|asx\|mov\|qt\|rm\)'
125 +esac
126 +                       
127 \ No newline at end of file
128 diff -ruN zsh-4.0.7./Completion/Unix/Command/_sms zsh-4.0.7/Completion/Unix/Command/_sms
129 --- zsh-4.0.7./Completion/Unix/Command/_sms     Thu Jan  1 01:00:00 1970
130 +++ zsh-4.0.7/Completion/Unix/Command/_sms      Fri Apr  4 20:17:13 2003
131 @@ -0,0 +1,61 @@
132 +#compdef sms smsaddr
133 +
134 +# Copyright (c) 2002 GoTaR <gotar@priv0.onet.pl>
135 +
136 +#_sms_aliases0 () {
137 +##     compadd "$@" $(print ${(f)"$(smsaddr -l | cut -f1)"})
138 +#      local smsas
139 +#      smsas=(`smsaddr -l | perl -ne 's/       +/:/; if (/^'$PREFIX'/) {print} else {if (/:'$PREFIX'/) {/^(.*):(.*)$/; print "$2:$1 "}}'`)
140 +#      _describe "SMS alias" "smsas"
141 +#}
142 +
143 +_sms_aliases () {
144 +       local smsas
145 +       smsas=(${(f)"$(smsaddr -l)"})
146 +       smsas=(${smsas/ ##/:})
147 +#if [[ -n "$PREFIX$SUFFIX" ]]; then
148 +       smsas=($smsas ${smsas/(#s)(#b)(^($PREFIX)*):(*)(#e)/$match[3]:$match[1]})
149 +#fi
150 +#      smsas=(${(M)smsas:#$PREFIX*})
151 +       _describe "SMS alias" smsas
152 +}
153 +
154 +_sms_alias () {
155 +       local smsas
156 +       smsas=(${(f)"$(smsaddr -l)"})
157 +       smsas=(${smsas/ ##/:})
158 +       _describe "SMS alias" smsas
159 +}
160 +
161 +#_sms_aliases1 () {
162 +#smsaddr -l | while read alias number; do
163 +#      if [[ $alias == $PREFIX*$SUFFIX || $number == $PREFIX*$SUFFIX ]]; then
164 +#              compadd -U -- $alias
165 +#      fi
166 +#done
167 +#}            
168 +
169 +case "$service" in
170 +sms)
171 +       _arguments \
172 +               '1:SMS alias or number:_sms_aliases' \
173 +               ':message:_guard' \
174 +               '--split[split to max n messages]:number of messages:(2 5 9)' \
175 +               '--supersms[send via SuperSMS.pl gateway]' \
176 +               '--czat[send via Idea.czat gateway]' \
177 +               '--dlogin[login for Idea.czat]:login:_guard' \
178 +               '--pf[send via Panorama Firm gateway]' \
179 +               '--plusmail[send message to PlusGSM network via e-mail gateway, not www]' \
180 +               '--cfg[config file]:config file:_files' \
181 +               '--check[check for the new version of this program]' \
182 +               '--from[sender e-mail adress for PlusGSM and Idea gateways]:e-mail:_guard' \
183 +               '--ip[sender IP]:IP:_guard' \
184 +               '--sign[set signature]:signature:_guard' \
185 +               '--thanksto'
186 +       ;;
187 +smsaddr)
188 +       _arguments \
189 +               '(-r -l)-a[add new entry]:New entry name:_guard:Phone number:_guard' \
190 +               '(-a -l)-r[remove existing entry]:SMS alias:_sms_alias' \
191 +               '(-a -r)-l[list entry]:SMS alias:_sms_alias'
192 +esac
This page took 0.201296 seconds and 4 git commands to generate.