Gentoo Archives: gentoo-commits

From: Tim Harder <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/zsh-completion:master commit in: src/
Date: Mon, 01 Dec 2014 07:48:48
Message-Id: 1417420120.06acf6a6ee6e054e45a51481ad491cc51db6d306.radhermit@gentoo
1 commit: 06acf6a6ee6e054e45a51481ad491cc51db6d306
2 Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 1 07:47:55 2014 +0000
4 Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 1 07:48:40 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=06acf6a6
7
8 remove unnecessary whitespace
9
10 ---
11 src/_genlop | 26 +++++++++++++-------------
12 src/_gentoo_packages | 8 ++++----
13 src/_gentoolkit | 7 +++----
14 src/_layman | 2 +-
15 src/_portage | 8 ++++----
16 5 files changed, 25 insertions(+), 26 deletions(-)
17
18 diff --git a/src/_genlop b/src/_genlop
19 index 322babb..6e817fd 100644
20 --- a/src/_genlop
21 +++ b/src/_genlop
22 @@ -2,7 +2,7 @@
23
24 #genlop 0.30.8
25 _genlop () {
26 -local prev1="$words[CURRENT-1]" prev2="$words[CURRENT-2]" days months arg single state lstate
27 +local prev1="$words[CURRENT-1]" prev2="$words[CURRENT-2]" days months arg single state lstate
28 days=(monday tuesday wednesday thursday friday saturday sunday)
29 months=(january february march april may june july august september october november december)
30 arg=( --current -c --time -t --gmt -g --info -i --file -f --rsync -r --unmerge -u --date --search -s --list -l )
31 @@ -12,14 +12,14 @@ single=( --current -c --pretend -p --help -h --version -v )
32 compadd in\ $months && return 0
33 [[ ${prev1} == ([2-9]|[1-9][0-9]*) && ${prev2} != \
34 (january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
35 - _values '' 'days ago' 'months ago' 'years ago' 'weeks ago' && return 0
36 + _values '' 'days ago' 'months ago' 'years ago' 'weeks ago' && return 0
37 [[ ${prev1} == (1) && ${prev2} != \
38 (january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
39 - _values '' 'day ago' 'month ago' 'year ago' 'week ago' && return 0
40 + _values '' 'day ago' 'month ago' 'year ago' 'week ago' && return 0
41
42 case "$prev1" in
43 last)
44 - _values '' month week
45 + _values '' month week
46 compadd $days && return 0
47 ;;
48 1st|2nd|3rd|4th|5th)
49 @@ -28,10 +28,10 @@ single=( --current -c --pretend -p --help -h --version -v )
50 january|february|march|april|may|june|july|august|september|october|november|december)
51 compadd {1..31} && return 0
52 ;;
53 - --date)
54 + --date)
55 _message 'enter number for more options or use mm/dd/yyyy format'
56 _values '' \
57 - last yesterday 1st 2nd 3rd 4th 5th
58 + last yesterday 1st 2nd 3rd 4th 5th
59 _alternative \
60 '*:*:_days' '*:*:_months' && return 0
61 ;;
62 @@ -57,27 +57,27 @@ single=( --current -c --pretend -p --help -h --version -v )
63 "($single)*:package:_gentoo_packages available"
64 ;;
65 esac
66 -
67 +
68 while [[ -n "$state" ]]; do
69 lstate=$state
70 state=''
71 case "$lstate" in
72 date) _message 'enter number for more options or use mm/dd/yyyy format'
73 _values '' \
74 - last yesterday 1st 2nd 3rd 4th 5th
75 + last yesterday 1st 2nd 3rd 4th 5th
76 _alternative \
77 ':*:_days' ':*:_months' && return 0
78 ;;
79 esac
80 - done
81 + done
82 }
83
84 _days() {
85 - local m="monday" t="tuesday" w="wednesday" T="thursday" f="friday" s="saturday" S="sunday"
86 + local m="monday" t="tuesday" w="wednesday" T="thursday" f="friday" s="saturday" S="sunday"
87 local day=$(date +%u)
88 if [[ ${day} == 1 ]] then compadd $m
89 elif [[ ${day} == 2 ]] then compadd $m $t
90 - elif [[ ${day} == 3 ]] then compadd $m $t $w
91 + elif [[ ${day} == 3 ]] then compadd $m $t $w
92 elif [[ ${day} == 4 ]] then compadd $m $t $w $T
93 elif [[ ${day} == 5 ]] then compadd $m $t $w $T $f
94 elif [[ ${day} == 6 ]] then compadd $m $t $w $T $f $s
95 @@ -89,9 +89,9 @@ _months() {
96 local month=$(date +%m)
97 if [[ ${month} == 01 ]] then compadd $j
98 elif [[ ${month} == 02 ]] then compadd $j $f
99 - elif [[ ${month} == 03 ]] then compadd $j $f $m
100 + elif [[ ${month} == 03 ]] then compadd $j $f $m
101 elif [[ ${month} == 04 ]] then compadd $j $f $m $a
102 - elif [[ ${month} == 05 ]] then compadd $j $f $m $a $M
103 + elif [[ ${month} == 05 ]] then compadd $j $f $m $a $M
104 elif [[ ${month} == 06 ]] then compadd $j $f $m $a $M $ju
105 elif [[ ${month} == 07 ]] then compadd $j $f $m $a $M $ju $J
106 elif [[ ${month} == 08 ]] then compadd $j $f $m $a $M $ju $J $A
107
108 diff --git a/src/_gentoo_packages b/src/_gentoo_packages
109 index 2bfa8c4..da770b2 100644
110 --- a/src/_gentoo_packages
111 +++ b/src/_gentoo_packages
112 @@ -224,7 +224,7 @@ _gentoo_packages_update_available_pkgnames_only(){
113 trees=($(_portdir) $(_portdir -o))
114
115 packages=($trees/*-*/*(:t))
116 - _wanted packages expl 'package' compadd - "${(@)packages}"
117 + _wanted packages expl 'package' compadd - "${(@)packages}"
118 }
119
120 _gentoo_packages_update_available(){
121 @@ -234,7 +234,7 @@ _gentoo_packages_update_available(){
122 category=($trees/*-*(/:t))
123
124 packages=($trees/*-*/*(:t))
125 - _wanted packages expl 'package' compadd - "${(@)packages}"
126 + _wanted packages expl 'package' compadd - "${(@)packages}"
127
128 # Complete cat/pkg. _multi_parts is much to slow for such a large task,
129 # _sep_parts removes the dash from gnome-<tab>, and _path_files wants to
130 @@ -259,7 +259,7 @@ _gentoo_packages_update_available_versions(){
131 category=($trees/*-*(/:t))
132 typeset -U category
133
134 - if [[ $#PREFIX -ge 1 && -z $words[(r)(--inject|-i)] ]] ; then
135 + if [[ $#PREFIX -ge 1 && -z $words[(r)(--inject|-i)] ]] ; then
136 overlay_ebuilds=($=PORTDIR_OVERLAY/*-*/${PREFIX%%-[0-9]#*}*/*.ebuild(:t:r) )
137 portage_ebuilds=($PORTDIR/metadata/cache/*-*/${PREFIX%%-[0-9]#*}*(:t))
138 _wanted packages expl 'package' compadd $portage_ebuilds $overlay_ebuilds
139 @@ -292,7 +292,7 @@ _gentoo_packages () {
140 _message "unknown command: $command"
141 return
142 }
143 - [[ "$pkgset" == (installed(_versions|_sets|)|available(_versions|_sets|_pkgnames_only|)|binary|category|(active_|)useflag) ]] || {
144 + [[ "$pkgset" == (installed(_versions|_sets|)|available(_versions|_sets|_pkgnames_only|)|binary|category|(active_|)useflag) ]] || {
145 pkgset="$command"
146 }
147 expl=("${(@)argv[1,-2]}")
148
149 diff --git a/src/_gentoolkit b/src/_gentoolkit
150 index 25d679d..7e50dc4 100644
151 --- a/src/_gentoolkit
152 +++ b/src/_gentoolkit
153 @@ -14,7 +14,7 @@
154
155 # XXX: shouldn't this go to _gentoo_package?
156 _packages () {
157 - if compset -P '(\\|)(>=|<=|<|>|=)' ; then
158 + if compset -P '(\\|)(>=|<=|<|>|=)' ; then
159 _gentoo_packages ${*/(#m)(installed|available)/${MATCH}_versions}
160 else
161 _gentoo_packages $*
162 @@ -41,7 +41,7 @@ _euse () {
163 {'(--local)-l','(-l)--local'}'[show only local use flags]'
164 )
165 if (( CURRENT == 2 ));then
166 - _arguments -s $start_args
167 + _arguments -s $start_args
168 elif (( CURRENT == 3 ));then
169 case "$words[2]" in
170 -i|--info|-a|--active)
171 @@ -265,7 +265,7 @@ _eclean_wrapper () {
172 #_values "packages options" $pkg_opts &&
173 return 0
174 elif (( $words[(I)(distfiles)] )); then
175 - _values "distfiles options" $dist_opts &&
176 + _values "distfiles options" $dist_opts &&
177 return 0
178 else
179 _arguments -s $global_opts
180 @@ -404,4 +404,3 @@ case "$service" in
181 _revdep-rebuild "$@" && return 0
182 ;;
183 esac
184 -
185
186 diff --git a/src/_layman b/src/_layman
187 index 52e775f..01c1333 100644
188 --- a/src/_layman
189 +++ b/src/_layman
190 @@ -2,7 +2,7 @@
191
192 # layman-1.1.1
193 #
194 -local arguments actions_args actions global_opts add_actions
195 +local arguments actions_args actions global_opts add_actions
196 _layman_remote_overlays() {
197 local layman_list_overlays
198 layman_list_overlays=(${(S)${${(f)"$(layman -k -N -L 2>/dev/null)"}//\[*}#\* })
199
200 diff --git a/src/_portage b/src/_portage
201 index e530151..aef3487 100644
202 --- a/src/_portage
203 +++ b/src/_portage
204 @@ -16,7 +16,7 @@
205 # Stuff for ebuild
206 _ebuild () {
207 if (( CURRENT == 2 ));then
208 - _files -g \*.ebuild
209 + _files -g \*.ebuild
210 elif (( CURRENT > 2 ));then
211 _values "ebuild command" \
212 'clean[Cleans the temporary build directory]' \
213 @@ -36,7 +36,7 @@ _ebuild () {
214 'postrm[Run specific actions that need to be executed after unmerge]' \
215 'config[Run specific actions needed to be executed after the emerge process has completed.]' \
216 'package[This command is a lot like the merge command, but create a .tbz2 package]' \
217 - 'manifest[Updates the manifest file for the package.]' \
218 + 'manifest[Updates the manifest file for the package.]' \
219 'rpm[Builds a RedHat RPM package]'
220 fi
221
222 @@ -77,7 +77,7 @@ _emerge () {
223 -u --update -U --upgradeonly --config)
224
225 common_args=(
226 - "($noask_opts --sync)"{-p,--pretend}"[Simply display what would be done]"
227 + "($noask_opts --sync)"{-p,--pretend}"[Simply display what would be done]"
228 "($noask_opts)"{-a,--ask}"[Ask what would be done]"
229 '(-d --debug --help -h --version -V)'{-d,--debug}'[Tells emerge to run the emerge command in debug mode]'
230 '(--quiet -q --verbose -v)'{-q,--quiet}'[General outcome is a reduced or condensed output]'
231 @@ -202,7 +202,7 @@ _emerge () {
232 && return 0
233 fi
234
235 - elif (( $words[(I)(world|system)] )) ; then
236 + elif (( $words[(I)(world|system)] )) ; then
237 _arguments -s \
238 "$common_args[@]" "$install_args[@]" \
239 "($nopkg_opts[1,-2] --inject -i --oneshot -1):" && return 0