zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH workers mailing list" <zsh-workers@sunsite.auc.dk>
Subject: PATCH: _cd and $PWD in $cdpath
Date: Thu, 9 Mar 2000 18:36:36 +0300	[thread overview]
Message-ID: <000001bf89dd$414c2430$21c9ca95@mow.siemens.ru> (raw)

[-- 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 -/"

                 reply	other threads:[~2000-03-09 15:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001bf89dd$414c2430$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).