aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2014-11-30 23:47:55 -0800
committerTim Harder <radhermit@gentoo.org>2014-11-30 23:48:40 -0800
commit06acf6a6ee6e054e45a51481ad491cc51db6d306 (patch)
tree4c63c410eac15a05a3d0f7cdc328fbd9156842ee
parent_gentoo_packages: more stylistic consistency (diff)
downloadzsh-completion-06acf6a6ee6e054e45a51481ad491cc51db6d306.tar.gz
zsh-completion-06acf6a6ee6e054e45a51481ad491cc51db6d306.tar.bz2
zsh-completion-06acf6a6ee6e054e45a51481ad491cc51db6d306.zip
remove unnecessary whitespace
-rw-r--r--src/_genlop26
-rw-r--r--src/_gentoo_packages8
-rw-r--r--src/_gentoolkit7
-rw-r--r--src/_layman2
-rw-r--r--src/_portage8
5 files changed, 25 insertions, 26 deletions
diff --git a/src/_genlop b/src/_genlop
index 322babb..6e817fd 100644
--- a/src/_genlop
+++ b/src/_genlop
@@ -2,7 +2,7 @@
#genlop 0.30.8
_genlop () {
-local prev1="$words[CURRENT-1]" prev2="$words[CURRENT-2]" days months arg single state lstate
+local prev1="$words[CURRENT-1]" prev2="$words[CURRENT-2]" days months arg single state lstate
days=(monday tuesday wednesday thursday friday saturday sunday)
months=(january february march april may june july august september october november december)
arg=( --current -c --time -t --gmt -g --info -i --file -f --rsync -r --unmerge -u --date --search -s --list -l )
@@ -12,14 +12,14 @@ single=( --current -c --pretend -p --help -h --version -v )
compadd in\ $months && return 0
[[ ${prev1} == ([2-9]|[1-9][0-9]*) && ${prev2} != \
(january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
- _values '' 'days ago' 'months ago' 'years ago' 'weeks ago' && return 0
+ _values '' 'days ago' 'months ago' 'years ago' 'weeks ago' && return 0
[[ ${prev1} == (1) && ${prev2} != \
(january|february|march|april|may|june|july|august|september|october|november|december) ]] &&
- _values '' 'day ago' 'month ago' 'year ago' 'week ago' && return 0
+ _values '' 'day ago' 'month ago' 'year ago' 'week ago' && return 0
case "$prev1" in
last)
- _values '' month week
+ _values '' month week
compadd $days && return 0
;;
1st|2nd|3rd|4th|5th)
@@ -28,10 +28,10 @@ single=( --current -c --pretend -p --help -h --version -v )
january|february|march|april|may|june|july|august|september|october|november|december)
compadd {1..31} && return 0
;;
- --date)
+ --date)
_message 'enter number for more options or use mm/dd/yyyy format'
_values '' \
- last yesterday 1st 2nd 3rd 4th 5th
+ last yesterday 1st 2nd 3rd 4th 5th
_alternative \
'*:*:_days' '*:*:_months' && return 0
;;
@@ -57,27 +57,27 @@ single=( --current -c --pretend -p --help -h --version -v )
"($single)*:package:_gentoo_packages available"
;;
esac
-
+
while [[ -n "$state" ]]; do
lstate=$state
state=''
case "$lstate" in
date) _message 'enter number for more options or use mm/dd/yyyy format'
_values '' \
- last yesterday 1st 2nd 3rd 4th 5th
+ last yesterday 1st 2nd 3rd 4th 5th
_alternative \
':*:_days' ':*:_months' && return 0
;;
esac
- done
+ done
}
_days() {
- local m="monday" t="tuesday" w="wednesday" T="thursday" f="friday" s="saturday" S="sunday"
+ local m="monday" t="tuesday" w="wednesday" T="thursday" f="friday" s="saturday" S="sunday"
local day=$(date +%u)
if [[ ${day} == 1 ]] then compadd $m
elif [[ ${day} == 2 ]] then compadd $m $t
- elif [[ ${day} == 3 ]] then compadd $m $t $w
+ elif [[ ${day} == 3 ]] then compadd $m $t $w
elif [[ ${day} == 4 ]] then compadd $m $t $w $T
elif [[ ${day} == 5 ]] then compadd $m $t $w $T $f
elif [[ ${day} == 6 ]] then compadd $m $t $w $T $f $s
@@ -89,9 +89,9 @@ _months() {
local month=$(date +%m)
if [[ ${month} == 01 ]] then compadd $j
elif [[ ${month} == 02 ]] then compadd $j $f
- elif [[ ${month} == 03 ]] then compadd $j $f $m
+ elif [[ ${month} == 03 ]] then compadd $j $f $m
elif [[ ${month} == 04 ]] then compadd $j $f $m $a
- elif [[ ${month} == 05 ]] then compadd $j $f $m $a $M
+ elif [[ ${month} == 05 ]] then compadd $j $f $m $a $M
elif [[ ${month} == 06 ]] then compadd $j $f $m $a $M $ju
elif [[ ${month} == 07 ]] then compadd $j $f $m $a $M $ju $J
elif [[ ${month} == 08 ]] then compadd $j $f $m $a $M $ju $J $A
diff --git a/src/_gentoo_packages b/src/_gentoo_packages
index 2bfa8c4..da770b2 100644
--- a/src/_gentoo_packages
+++ b/src/_gentoo_packages
@@ -224,7 +224,7 @@ _gentoo_packages_update_available_pkgnames_only(){
trees=($(_portdir) $(_portdir -o))
packages=($trees/*-*/*(:t))
- _wanted packages expl 'package' compadd - "${(@)packages}"
+ _wanted packages expl 'package' compadd - "${(@)packages}"
}
_gentoo_packages_update_available(){
@@ -234,7 +234,7 @@ _gentoo_packages_update_available(){
category=($trees/*-*(/:t))
packages=($trees/*-*/*(:t))
- _wanted packages expl 'package' compadd - "${(@)packages}"
+ _wanted packages expl 'package' compadd - "${(@)packages}"
# Complete cat/pkg. _multi_parts is much to slow for such a large task,
# _sep_parts removes the dash from gnome-<tab>, and _path_files wants to
@@ -259,7 +259,7 @@ _gentoo_packages_update_available_versions(){
category=($trees/*-*(/:t))
typeset -U category
- if [[ $#PREFIX -ge 1 && -z $words[(r)(--inject|-i)] ]] ; then
+ if [[ $#PREFIX -ge 1 && -z $words[(r)(--inject|-i)] ]] ; then
overlay_ebuilds=($=PORTDIR_OVERLAY/*-*/${PREFIX%%-[0-9]#*}*/*.ebuild(:t:r) )
portage_ebuilds=($PORTDIR/metadata/cache/*-*/${PREFIX%%-[0-9]#*}*(:t))
_wanted packages expl 'package' compadd $portage_ebuilds $overlay_ebuilds
@@ -292,7 +292,7 @@ _gentoo_packages () {
_message "unknown command: $command"
return
}
- [[ "$pkgset" == (installed(_versions|_sets|)|available(_versions|_sets|_pkgnames_only|)|binary|category|(active_|)useflag) ]] || {
+ [[ "$pkgset" == (installed(_versions|_sets|)|available(_versions|_sets|_pkgnames_only|)|binary|category|(active_|)useflag) ]] || {
pkgset="$command"
}
expl=("${(@)argv[1,-2]}")
diff --git a/src/_gentoolkit b/src/_gentoolkit
index 25d679d..7e50dc4 100644
--- a/src/_gentoolkit
+++ b/src/_gentoolkit
@@ -14,7 +14,7 @@
# XXX: shouldn't this go to _gentoo_package?
_packages () {
- if compset -P '(\\|)(>=|<=|<|>|=)' ; then
+ if compset -P '(\\|)(>=|<=|<|>|=)' ; then
_gentoo_packages ${*/(#m)(installed|available)/${MATCH}_versions}
else
_gentoo_packages $*
@@ -41,7 +41,7 @@ _euse () {
{'(--local)-l','(-l)--local'}'[show only local use flags]'
)
if (( CURRENT == 2 ));then
- _arguments -s $start_args
+ _arguments -s $start_args
elif (( CURRENT == 3 ));then
case "$words[2]" in
-i|--info|-a|--active)
@@ -265,7 +265,7 @@ _eclean_wrapper () {
#_values "packages options" $pkg_opts &&
return 0
elif (( $words[(I)(distfiles)] )); then
- _values "distfiles options" $dist_opts &&
+ _values "distfiles options" $dist_opts &&
return 0
else
_arguments -s $global_opts
@@ -404,4 +404,3 @@ case "$service" in
_revdep-rebuild "$@" && return 0
;;
esac
-
diff --git a/src/_layman b/src/_layman
index 52e775f..01c1333 100644
--- a/src/_layman
+++ b/src/_layman
@@ -2,7 +2,7 @@
# layman-1.1.1
#
-local arguments actions_args actions global_opts add_actions
+local arguments actions_args actions global_opts add_actions
_layman_remote_overlays() {
local layman_list_overlays
layman_list_overlays=(${(S)${${(f)"$(layman -k -N -L 2>/dev/null)"}//\[*}#\* })
diff --git a/src/_portage b/src/_portage
index e530151..aef3487 100644
--- a/src/_portage
+++ b/src/_portage
@@ -16,7 +16,7 @@
# Stuff for ebuild
_ebuild () {
if (( CURRENT == 2 ));then
- _files -g \*.ebuild
+ _files -g \*.ebuild
elif (( CURRENT > 2 ));then
_values "ebuild command" \
'clean[Cleans the temporary build directory]' \
@@ -36,7 +36,7 @@ _ebuild () {
'postrm[Run specific actions that need to be executed after unmerge]' \
'config[Run specific actions needed to be executed after the emerge process has completed.]' \
'package[This command is a lot like the merge command, but create a .tbz2 package]' \
- 'manifest[Updates the manifest file for the package.]' \
+ 'manifest[Updates the manifest file for the package.]' \
'rpm[Builds a RedHat RPM package]'
fi
@@ -77,7 +77,7 @@ _emerge () {
-u --update -U --upgradeonly --config)
common_args=(
- "($noask_opts --sync)"{-p,--pretend}"[Simply display what would be done]"
+ "($noask_opts --sync)"{-p,--pretend}"[Simply display what would be done]"
"($noask_opts)"{-a,--ask}"[Ask what would be done]"
'(-d --debug --help -h --version -V)'{-d,--debug}'[Tells emerge to run the emerge command in debug mode]'
'(--quiet -q --verbose -v)'{-q,--quiet}'[General outcome is a reduced or condensed output]'
@@ -202,7 +202,7 @@ _emerge () {
&& return 0
fi
- elif (( $words[(I)(world|system)] )) ; then
+ elif (( $words[(I)(world|system)] )) ; then
_arguments -s \
"$common_args[@]" "$install_args[@]" \
"($nopkg_opts[1,-2] --inject -i --oneshot -1):" && return 0