about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-03-06 11:36:02 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-03-06 11:36:02 +0000
commite43a5fc8ea0725501c6d743df4432cd8879d943b (patch)
tree24583436b3b3ecd09d4955c8dd08d0a62907156c
parent4065dd5258d64f2f450a73c80cf2a394d56251da (diff)
downloadzsh-e43a5fc8ea0725501c6d743df4432cd8879d943b.tar.gz
zsh-e43a5fc8ea0725501c6d743df4432cd8879d943b.tar.xz
zsh-e43a5fc8ea0725501c6d743df4432cd8879d943b.zip
users/1097: rehash style for external commands
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Zsh/Type/_command_names2
-rw-r--r--Doc/Zsh/compsys.yo8
3 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 86f2bfa00..f5d738c1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-06  Peter Stephenson  <pws@csr.com>
+
+	* users/1097: Completion/Zsh/Type/_command_names,
+	Doc/Zsh/compsys.yo: rehash style for external commands.
+
 2006-03-03  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 22318: Src/builtin.c: uniquifying special arrays was broken.
@@ -9,7 +14,7 @@
 	* 22317: Src/builtins.c, Src/exec.c: exiting the shell from
 	code forked from within a function doesn't maintain the
 	exit status.
-	
+
 	* 22277, 22281 plus tweaks: Src/exec.c, Src/jobs.c, Src/signals.c,
 	Test/C03traps.ztst: standardize behaviour of using wait builtin
 	with trapped signals.
diff --git a/Completion/Zsh/Type/_command_names b/Completion/Zsh/Type/_command_names
index f2b51713c..85ca3b912 100644
--- a/Completion/Zsh/Type/_command_names
+++ b/Completion/Zsh/Type/_command_names
@@ -6,6 +6,8 @@
 
 local args defs
 
+zstyle -t ":completion:${curcontext}:commands" rehash && rehash
+
 defs=(
   'commands:external command:compadd -k commands'
 )
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 2c1929261..11c50cf61 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -2101,6 +2101,14 @@ expanded but only in command position.  If it is set to `tt(false)',
 regular aliases will never be expanded.   If it is set to `tt(always)',
 regular aliases will be expanded even if not in command position.
 )
+kindex(rehash, completion style)
+item(tt(rehash))(
+If this is set when completing external commands, the internal
+list (hash) of commands will be updated for each search by issuing
+the tt(rehash) command.  There is a speed penalty for this which
+is only likely to be noticeable when directories in the path have
+slow file access.
+)
 kindex(remote-access, completion style)
 item(tt(remote-access))(
 If set to tt(false), certain commands will be prevented from making