mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-30 05:40:58 +01:00
21302: make sure expl is declared local in completion functions
This commit is contained in:
parent
1caf681523
commit
0d8d202ff5
21 changed files with 39 additions and 16 deletions
15
ChangeLog
15
ChangeLog
|
|
@ -1,3 +1,18 @@
|
||||||
|
2005-06-08 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
||||||
|
|
||||||
|
* 21302: Completion/Linux/Command/_pkgtool,
|
||||||
|
Completion/Unix/Command/_ant, Completion/Unix/Command/_bogofilter,
|
||||||
|
Completion/Unix/Command/_cdrecord, Completion/Unix/Command/_chkconfig,
|
||||||
|
Completion/Unix/Command/_chmod, Completion/Unix/Command/_gs,
|
||||||
|
Completion/Unix/Command/_look, Completion/Unix/Command/_mount,
|
||||||
|
Completion/Unix/Command/_python, Completion/Unix/Command/_rar,
|
||||||
|
Completion/Unix/Type/_file_systems, Completion/Unix/Type/_global_tags,
|
||||||
|
Completion/Unix/Type/_locales, Completion/Unix/Type/_user_at_host,
|
||||||
|
Completion/X/Command/_mozilla, Completion/X/Command/_mplayer,
|
||||||
|
Completion/X/Command/_netscape, Completion/X/Type/_x_visual,
|
||||||
|
Completion/Zsh/Context/_equal: make sure expl is declared local in
|
||||||
|
completion functions
|
||||||
|
|
||||||
2005-06-07 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
2005-06-07 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
|
||||||
|
|
||||||
* unposted: Completion/Zsh/Command/_dirs: fix typo in opt description
|
* unposted: Completion/Zsh/Command/_dirs: fix typo in opt description
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#compdef installpkg upgradepkg removepkg pkgtool explodepkg makepkg
|
#compdef installpkg upgradepkg removepkg pkgtool explodepkg makepkg
|
||||||
|
|
||||||
|
local expl
|
||||||
|
|
||||||
case "$service" in
|
case "$service" in
|
||||||
installpkg)
|
installpkg)
|
||||||
_arguments \
|
_arguments \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Apache Ant version 1.6.4
|
# Apache Ant version 1.6.4
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1
|
local curcontext="$curcontext" state line expl ret=1
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
local buildfile classpath cp userjars importedfiles target='*:target:->target' targets tmp
|
local buildfile classpath cp userjars importedfiles target='*:target:->target' targets tmp
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef bogoutil bogotune bogofilter
|
#compdef bogoutil bogotune bogofilter
|
||||||
|
|
||||||
local ret bogotokens
|
local expl ret bogotokens
|
||||||
|
|
||||||
_bogoutil_caching_policy () {
|
_bogoutil_caching_policy () {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef cdrecord
|
#compdef cdrecord
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1
|
local curcontext="$curcontext" state line expl ret=1
|
||||||
local devices btypes
|
local devices btypes
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef chkconfig
|
#compdef chkconfig
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1
|
local curcontext="$curcontext" state line expl ret=1
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
linux*)
|
linux*)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef chmod
|
#compdef chmod
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1
|
local curcontext="$curcontext" state line expl ret=1
|
||||||
local -a args privs
|
local -a args privs
|
||||||
|
|
||||||
args=( '*:file:->files' )
|
args=( '*:file:->files' )
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ if compset -N --; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
local curcontext="$curcontext" state line ret=1
|
local curcontext="$curcontext" state line expl ret=1
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
_x_arguments -C \
|
_x_arguments -C \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef look
|
#compdef look
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1
|
local curcontext="$curcontext" state line expl ret=1
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
_arguments -C -s \
|
_arguments -C -s \
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ fi
|
||||||
# arguments for the `mount' command for different operating systems
|
# arguments for the `mount' command for different operating systems
|
||||||
# are below these table.
|
# are below these table.
|
||||||
|
|
||||||
local curcontext="$curcontext" state line suf ret=1
|
local curcontext="$curcontext" state line expl suf ret=1
|
||||||
local args deffs=iso9660 tmp typeops=-t _fs_any _nfs_access _fs_nfs _nfs_ufs \
|
local args deffs=iso9660 tmp typeops=-t _fs_any _nfs_access _fs_nfs _nfs_ufs \
|
||||||
_fs_ufs _fs_efs _fs_iso9660 _fs_cachefs _fs_s5fs _fs_tmpfs _fs_pcfs _fs_hsfs \
|
_fs_ufs _fs_efs _fs_iso9660 _fs_cachefs _fs_s5fs _fs_tmpfs _fs_pcfs _fs_hsfs \
|
||||||
_fs_advfs _fs_cdfs _fs_affs _fs_ext2 _fs_fat _fs_ext3 _fs_msdos _fs_umsdos \
|
_fs_advfs _fs_cdfs _fs_affs _fs_ext2 _fs_fat _fs_ext3 _fs_msdos _fs_umsdos \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Python 2.4
|
# Python 2.4
|
||||||
|
|
||||||
local curcontext="$curcontext" state line
|
local curcontext="$curcontext" state line expl
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
_arguments -s -S \
|
_arguments -s -S \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef rar unrar
|
#compdef rar unrar
|
||||||
|
|
||||||
local common
|
local common expl
|
||||||
|
|
||||||
common=(
|
common=(
|
||||||
'-ad[append archive name to destination path]'
|
'-ad[append archive name to destination path]'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
local fss
|
local expl fss
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
aix*) fss=( jfs nfs cdrfs ) ;;
|
aix*) fss=( jfs nfs cdrfs ) ;;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
|
local expl
|
||||||
|
|
||||||
_wanted global-tags expl 'tag' compadd -M 'm:{a-zA-Z}={A-Za-z}' \
|
_wanted global-tags expl 'tag' compadd -M 'm:{a-zA-Z}={A-Za-z}' \
|
||||||
-a "$@" - $(_call_program global-tags global --completion $PREFIX)
|
-a "$@" - $(_call_program global-tags global --completion $PREFIX)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef -value-,LANG,-default- -value-,LANGUAGE,-default- -P -value-,LC_*,-default-
|
#compdef -value-,LANG,-default- -value-,LANGUAGE,-default- -P -value-,LC_*,-default-
|
||||||
|
|
||||||
local locales
|
local expl locales
|
||||||
|
|
||||||
if (( $+commands[locale] )); then
|
if (( $+commands[locale] )); then
|
||||||
locales=( $(_call_program locales locale -a) )
|
locales=( $(_call_program locales locale -a) )
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
# with `-t tag'.
|
# with `-t tag'.
|
||||||
# A `-' or `--' as the first argument is ignored.
|
# A `-' or `--' as the first argument is ignored.
|
||||||
|
|
||||||
local suf tag=accounts
|
local expl suf tag=accounts
|
||||||
|
|
||||||
if [[ "$1" = -t?* ]]; then
|
if [[ "$1" = -t?* ]]; then
|
||||||
tag="${1[3,-1]}"
|
tag="${1[3,-1]}"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef mozilla mozilla-firefox mozilla-xremote-client
|
#compdef mozilla mozilla-firefox mozilla-xremote-client
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1 suf
|
local curcontext="$curcontext" state line expl ret=1 suf
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
local popts="-installer -CreateProfile -P -ProfileWizard -ProfileManager -SelectProfile"
|
local popts="-installer -CreateProfile -P -ProfileWizard -ProfileManager -SelectProfile"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#compdef mplayer gmplayer
|
#compdef mplayer gmplayer
|
||||||
|
|
||||||
local suf ret=1 curcontext="$curcontext"
|
local suf ret=1 curcontext="$curcontext"
|
||||||
local -a vals state line
|
local -a vals state line expl
|
||||||
|
|
||||||
_x_arguments -C -s \
|
_x_arguments -C -s \
|
||||||
'!-abs:buffer size' \
|
'!-abs:buffer size' \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#compdef netscape
|
#compdef netscape
|
||||||
|
|
||||||
local curcontext="$curcontext" state line ret=1 suf files
|
local curcontext="$curcontext" state line expl ret=1 suf files
|
||||||
typeset -A opt_args
|
typeset -A opt_args
|
||||||
|
|
||||||
_x_arguments -C \
|
_x_arguments -C \
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
|
local expl
|
||||||
|
|
||||||
# with the -b option, include `Best' in the matches
|
# with the -b option, include `Best' in the matches
|
||||||
local best="${argv[(r)-b]:+Best}"
|
local best="${argv[(r)-b]:+Best}"
|
||||||
argv[(i)-b]=()
|
argv[(i)-b]=()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
#compdef -equal-
|
#compdef -equal-
|
||||||
|
|
||||||
|
local expl
|
||||||
|
|
||||||
_wanted commands expl command compadd -k commands
|
_wanted commands expl command compadd -k commands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue