aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2014-01-23 17:02:27 -0800
committerTim Harder <radhermit@gentoo.org>2014-01-23 17:02:27 -0800
commit7c594fdefba2aed0c294a144ff82329cdad3205a (patch)
treea804cc49cb03663e781a0905315a592afac4baca
parentFix command for listing eselect modules (diff)
downloadzsh-completion-7c594fdefba2aed0c294a144ff82329cdad3205a.tar.gz
zsh-completion-7c594fdefba2aed0c294a144ff82329cdad3205a.tar.bz2
zsh-completion-7c594fdefba2aed0c294a144ff82329cdad3205a.zip
Fix indentation and whitespace
-rw-r--r--_eselect238
1 files changed, 119 insertions, 119 deletions
diff --git a/_eselect b/_eselect
index 0f0362b..9cc28a5 100644
--- a/_eselect
+++ b/_eselect
@@ -6,166 +6,166 @@ _eselect_env () {
"noldconfig[Do not alter the ld.so cache or configuration]" && return 0
fi
_values "env options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- 'update[Collect environment variables from all scripts]' && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ 'update[Collect environment variables from all scripts]' && return 0
}
_eselect_binutils () {
local binutilslist
- if (( $words[(I)(set)] )); then
- binutilslist=(${${${(M)${(f)"$(eselect --color=no binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values "available binutils version" $binutilslist[@] && return 0
- fi
+ if (( $words[(I)(set)] )); then
+ binutilslist=(${${${(M)${(f)"$(eselect --color=no binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/})
+ _values "available binutils version" $binutilslist[@] && return 0
+ fi
_values "binutils options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List all installed version of binutils]" \
- "show[Print the currently active binutils version]" \
- "set[Activate one of the installed binutils]" && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List all installed version of binutils]" \
+ "show[Print the currently active binutils version]" \
+ "set[Activate one of the installed binutils]" && return 0
}
_eselect_kernel () {
local kernellist
- if (( $words[(I)(set)] )); then
- kernellist=(${${${(M)${(f)"$(eselect --color=no kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values "available kernel version" $kernellist[@] && return 0
- fi
+ if (( $words[(I)(set)] )); then
+ kernellist=(${${${(M)${(f)"$(eselect --color=no kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/})
+ _values "available kernel version" $kernellist[@] && return 0
+ fi
_values "kenrel options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List available kernel symlink targets]" \
- "show[Show the current kernel symlink]" \
- "set[Set a new kernel symlink target]" && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List available kernel symlink targets]" \
+ "show[Show the current kernel symlink]" \
+ "set[Set a new kernel symlink target]" && return 0
}
_eselect_ctags () {
local ctagslist
- if (( $words[(I)(set)] )); then
- ctagslist=(${${${(M)${(f)"$(eselect --color=no ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values "available ctags version" $ctagslist[@] && return 0
- fi
+ if (( $words[(I)(set)] )); then
+ ctagslist=(${${${(M)${(f)"$(eselect --color=no ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/})
+ _values "available ctags version" $ctagslist[@] && return 0
+ fi
_values "ctags options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List available ctags symlink targets]" \
- "show[Show the current target of the ctags symlink]" \
- "update[Automatically update the ctags symlink]" \
- "set[Set a new ctags symlink target]" && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List available ctags symlink targets]" \
+ "show[Show the current target of the ctags symlink]" \
+ "update[Automatically update the ctags symlink]" \
+ "set[Set a new ctags symlink target]" && return 0
}
_eselect_profile () {
local profilelist
- if (( $words[(I)(set)] )); then
- profilelist=(${${${(M)${(f)"$(eselect --color=no profile list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values -w "available profiles" $profilelist[@] \
- "--force[Forcibly set the symlink]" && return 0
- fi
+ if (( $words[(I)(set)] )); then
+ profilelist=(${${${(M)${(f)"$(eselect --color=no profile list)"}## *}// \**/}//( \[*\] | \[*\] )/})
+ _values -w "available profiles" $profilelist[@] \
+ "--force[Forcibly set the symlink]" && return 0
+ fi
_values "profile options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List available profile symlink targets]" \
- "show[Show the current make.profile symlink]" \
- "set[Set a new profile symlink target]" && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List available profile symlink targets]" \
+ "show[Show the current make.profile symlink]" \
+ "set[Set a new profile symlink target]" && return 0
}
_eselect_fontconfig () {
local fclistenabled fclistdisabled
- if (( $words[(I)(enable)] )); then
- fclistdisabled=(${${${${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
- _values -w ".conf to enable" $fclistdisabled[@] && return 0
+ if (( $words[(I)(enable)] )); then
+ fclistdisabled=(${${${${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
+ _values -w ".conf to enable" $fclistdisabled[@] && return 0
elif (( $words[(I)(disable)] )); then
- fclistenabled=(${${${(M)${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
- _values -w ".conf to disable" $fclistenabled[@] && return 0
- fi
+ fclistenabled=(${${${(M)${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/})
+ _values -w ".conf to disable" $fclistenabled[@] && return 0
+ fi
_values "fontconfig options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List available fontconfig .conf files]" \
- "disable[Disable specified fontconfig .conf file(s)]" \
- "enable[Enable specified fontconfig .conf file(s)]" && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List available fontconfig .conf files]" \
+ "disable[Disable specified fontconfig .conf file(s)]" \
+ "enable[Enable specified fontconfig .conf file(s)]" && return 0
}
_eselect_opengl () {
local opengllist
if (( $words[(I)(set)] )); then
- opengllist=(${${${(M)${(f)"$(eselect --color=no opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/})
+ opengllist=(${${${(M)${(f)"$(eselect --color=no opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/})
_values -w "opengl implementations and options" $opengllist[@] \
- "--use-old[If an implementationis already set, use that one instead]" \
- "--prefix[Set the source prefix]:path:_files -/" \
- "--dst-prefix[Set the destination prefix]:path:_files -/" \
- "--impl-headers[Override global headers with ones provided by this profile]" && return 0
+ "--use-old[If an implementationis already set, use that one instead]" \
+ "--prefix[Set the source prefix]:path:_files -/" \
+ "--dst-prefix[Set the destination prefix]:path:_files -/" \
+ "--impl-headers[Override global headers with ones provided by this profile]" && return 0
fi
_values "opengl options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List the available OpenGL implementations]" \
- "set[Select the OpenGL implementation]" \
- "show[Print the current OpenGL implementation]" && return 0
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List the available OpenGL implementations]" \
+ "set[Select the OpenGL implementation]" \
+ "show[Print the current OpenGL implementation]" && return 0
}
_eselect_vi () {
local vilist
if (( $words[(I)(set)] )); then
- vilist=(${${${(M)${(f)"$(eselect --color=no vi list)"}## *}// \**/}//( \[*\] | \[*\] )/})
- _values -w "vi implementation" $vilist[@] && return 0
+ vilist=(${${${(M)${(f)"$(eselect --color=no vi list)"}## *}// \**/}//( \[*\] | \[*\] )/})
+ _values -w "vi implementation" $vilist[@] && return 0
elif (( $words[(I)(update)] )); then
- _values -w "option" "--if-unset[Do not override existing implementation]" && return 0
+ _values -w "option" "--if-unset[Do not override existing implementation]" && return 0
fi
_values "vi options" \
- "help[Display help text]" \
- "usage[Display usage information]" \
- "version[Display version information]" \
- "list[List available vi implementations]" \
- "set[Set a new vi implementation provider]" \
- "show[Show the current vi implementation]" \
- "update[Automatically update the vi provider]"
+ "help[Display help text]" \
+ "usage[Display usage information]" \
+ "version[Display version information]" \
+ "list[List available vi implementations]" \
+ "set[Set a new vi implementation provider]" \
+ "show[Show the current vi implementation]" \
+ "update[Automatically update the vi provider]"
}
_eselect () {
- local globopts sedcmd modnames modopts
+ local globopts sedcmd modnames modopts
- globopts=(
- "--colour=no[Disable coloured output]" \
- "--color=no[Disable coloured output]"
- )
- modnames=(${${${(M)${(f)"$(eselect --color=no modules list)"}## *}// */}// /})
+ globopts=(
+ "--colour=no[Disable coloured output]" \
+ "--color=no[Disable coloured output]"
+ )
+ modnames=(${${${(M)${(f)"$(eselect --color=no modules list)"}## *}// */}// /})
- if ((CURRENT == 2)); then
- _arguments -s \
- "$globopts[@]" \
- "*:portage:_values 'eselect modules' \$modnames[@]" && return 0
- elif ((CURRENT == 3)); then
- if [[ $words[2] == --colour=no || $words[2] == --color=no ]]; then
- _arguments -s \
- "*:portage:_values 'eselect modules' \$modnames[@]" && return 0
- elif (( $modnames[(I)$words[2]] )); then
- if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then
- _eselect_$words[2] "$@"
- else
- modopts=(${${${(M)${(f)"$(eselect --color=no $words[2] usage)"}## *}// */}// /})
- _arguments -s \
- "*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0
- fi
- fi
- elif ((CURRENT >= 4)); then
- if (( $words[(I)(--color=no|--colour=no)] )); then
- if (( $modnames[(I)$words[3]] )); then
- if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then
- _eselect_$words[3] "$@"
- else
- modopts=(${${${${(M)${(f)"$(eselect --color=no $words[3] usage)"}## *}// */}// /}// *})
- _arguments -s \
- "*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0
- fi
- fi
- else
- if (( $modnames[(I)$words[2]] )); then
- _eselect_$words[2] "$@"
- fi
- fi
- fi
+ if ((CURRENT == 2)); then
+ _arguments -s \
+ "$globopts[@]" \
+ "*:portage:_values 'eselect modules' \$modnames[@]" && return 0
+ elif ((CURRENT == 3)); then
+ if [[ $words[2] == --colour=no || $words[2] == --color=no ]]; then
+ _arguments -s \
+ "*:portage:_values 'eselect modules' \$modnames[@]" && return 0
+ elif (( $modnames[(I)$words[2]] )); then
+ if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then
+ _eselect_$words[2] "$@"
+ else
+ modopts=(${${${(M)${(f)"$(eselect --color=no $words[2] usage)"}## *}// */}// /})
+ _arguments -s \
+ "*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0
+ fi
+ fi
+ elif ((CURRENT >= 4)); then
+ if (( $words[(I)(--color=no|--colour=no)] )); then
+ if (( $modnames[(I)$words[3]] )); then
+ if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then
+ _eselect_$words[3] "$@"
+ else
+ modopts=(${${${${(M)${(f)"$(eselect --color=no $words[3] usage)"}## *}// */}// /}// *})
+ _arguments -s \
+ "*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0
+ fi
+ fi
+ else
+ if (( $modnames[(I)$words[2]] )); then
+ _eselect_$words[2] "$@"
+ fi
+ fi
+ fi
}
_eselect "$@"