* PATCH: Cleaner envrionment after some completions
@ 2005-04-23 20:19 Tobias Gruetzmacher
2005-04-24 0:23 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Tobias Gruetzmacher @ 2005-04-23 20:19 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
Hi,
this patch makes some internal variables of completions where I noticed
this behavior local to the completion function. This makes the "set"
output more readable again. The patch also hides the vales of the
package cache for apt, since I don't think it helps anyone to see the
names of all 21241 Debian packes when calling "set". This might also be
useful for other variables of the completion system, like _comps,
_services and _comp_setup.
Greetings Tobi
--
GPG-Key 0xE2BEA341 - signed/encrypted mail preferred
My, oh so small, homepage: http://portfolio16.de/
http://www.fli4l.de/ - ISDN- & DSL-Router on one disk!
eegistered FLI4L-User #00000003
[-- Attachment #2: clean-env.patch --]
[-- Type: text/plain, Size: 1821 bytes --]
--- orig/Completion/Debian/Command/_apt
+++ mod/Completion/Debian/Command/_apt
@@ -57,8 +57,8 @@
local short_seq false true bool bool_prefix intlevel word word1 nul qnul match
local comp_bool comp_intlevel comp_configfile comp_arbitem comp_long comp_opt
- local comp_release
- local regex_short regex_long regex_all
+ local comp_release comp_long_prefix comp_short
+ local regex_short regex_long regex_all regex_long_prefix
regex_all=( \( "$@" \) )
--- orig/Completion/Debian/Type/_deb_packages
+++ mod/Completion/Debian/Type/_deb_packages
@@ -103,6 +103,8 @@
_deb_packages_update_$pkgset
+ typeset -gH $cachevar
+
_tags packages && compadd "$expl[@]" - "${(@P)cachevar}"
}
--- orig/Completion/Unix/Command/_mount
+++ mod/Completion/Unix/Command/_mount
@@ -40,7 +40,11 @@
# are below these table.
local curcontext="$curcontext" state line suf ret=1
-local args deffs=iso9660 tmp typeops=-t _nfs_access _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_advfs _fs_cdfs _fs_affs _fs_ext2 _fs_fat _fs_ext3 _fs_msdos _fs_umsdos \
+_fs_vfat _fs_hpfs _fs_ntfs _fs_reiserfs _fs_smbfs _fs_xfs _fs_std _fs_devfs \
+_fs_fdesc _fs_kernfs _fs_linprocfs _fs_procfs
typeset -A opt_args
--- orig/Completion/Unix/Command/_subversion
+++ mod/Completion/Unix/Command/_subversion
@@ -63,7 +63,7 @@
local cmd
if (( ! $+_svn_cmds )); then
- typeset -gA _svn_cmds
+ typeset -A _svn_cmds
_svn_cmds=(
${=${(f)${${"$(LC_MESSAGES=C _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: Cleaner envrionment after some completions
2005-04-23 20:19 PATCH: Cleaner envrionment after some completions Tobias Gruetzmacher
@ 2005-04-24 0:23 ` Bart Schaefer
2005-04-24 12:15 ` Tobias Gruetzmacher
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2005-04-24 0:23 UTC (permalink / raw)
To: zsh-workers
On Apr 23, 10:19pm, Tobias Gruetzmacher wrote:
}
} +++ mod/Completion/Unix/Command/_subversion
}
} if (( ! $+_svn_cmds )); then
} - typeset -gA _svn_cmds
} + typeset -A _svn_cmds
This one is wrong. The "g" in there makes _svn_cmds a global; if it's
removed to make it a a local, then 'if (( ! $+_svn_cmds ))' will always
be true, and _call_program will always be run.
Perhaps you meant 'typeset -gHA _svn_cmds' ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: Cleaner envrionment after some completions
2005-04-24 0:23 ` Bart Schaefer
@ 2005-04-24 12:15 ` Tobias Gruetzmacher
0 siblings, 0 replies; 3+ messages in thread
From: Tobias Gruetzmacher @ 2005-04-24 12:15 UTC (permalink / raw)
To: zsh-workers
Hi,
On Sun, Apr 24, 2005 at 12:23:30AM +0000, Bart Schaefer wrote:
> On Apr 23, 10:19pm, Tobias Gruetzmacher wrote:
> }
> } +++ mod/Completion/Unix/Command/_subversion
> }
> } if (( ! $+_svn_cmds )); then
> } - typeset -gA _svn_cmds
> } + typeset -A _svn_cmds
>
> This one is wrong. The "g" in there makes _svn_cmds a global; if it's
> removed to make it a a local, then 'if (( ! $+_svn_cmds ))' will always
> be true, and _call_program will always be run.
I somehow manged to miss the caching... So, yes, this is obviously
wrong.
> Perhaps you meant 'typeset -gHA _svn_cmds' ?
Yes, that looks good.
Greetings Tobi
--
GPG-Key 0xE2BEA341 - signed/encrypted mail preferred
My, oh so small, homepage: http://portfolio16.de/
http://www.fli4l.de/ - ISDN- & DSL-Router on one disk!
Registered FLI4L-User #00000003
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-24 12:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-23 20:19 PATCH: Cleaner envrionment after some completions Tobias Gruetzmacher
2005-04-24 0:23 ` Bart Schaefer
2005-04-24 12:15 ` Tobias Gruetzmacher
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).