zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _cd and $PWD in $cdpath
@ 2000-03-09 15:36 Andrej Borsenkow
  0 siblings, 0 replies; only message in thread
From: Andrej Borsenkow @ 2000-03-09 15:36 UTC (permalink / raw)
  To: ZSH workers mailing list

[-- Attachment #1: Type: text/plain, Size: 469 bytes --]


If you enable grouping and complete cd while in some directory from cdpath, everything is
listed twice (once as local and once as cdpath). In case of heavily populated directory it
is annoying. This simplistic fix removes $PWD from $cdpath before completing. It won't
work for symlinks in general case - but, hopefully, it is rare. Real solution would
require stat'ing every file in cdpath.

It is attached because of really long lines

-andrej

Have a nice DOS!
B >>

[-- Attachment #2: _cd.diff --]
[-- Type: application/octet-stream, Size: 420 bytes --]

--- Completion/Builtins/_cd.org	Thu Dec 23 18:51:12 1999
+++ Completion/Builtins/_cd	Thu Mar  9 18:22:33 2000
@@ -38,7 +38,7 @@
       _path_files -/
   else
     local tmpcdpath
-    tmpcdpath=(${(@)cdpath:#.})
+    tmpcdpath=(${${(@)cdpath:#.}:#$PWD})
     _alternative \
         'local-directories:local directories:_path_files -/' \
 	"path-directories:directories in cdpath:_path_files -W tmpcdpath -/"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-09 15:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-09 15:36 PATCH: _cd and $PWD in $cdpath Andrej Borsenkow

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).