From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16464 invoked from network); 17 Sep 1999 09:30:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Sep 1999 09:30:15 -0000 Received: (qmail 11910 invoked by alias); 17 Sep 1999 09:29:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7903 Received: (qmail 11903 invoked from network); 17 Sep 1999 09:29:52 -0000 Date: Fri, 17 Sep 1999 11:29:49 +0200 (MET DST) Message-Id: <199909170929.LAA02312@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: _cd This discussion about `don't always include the directoies from cdpath' made me think that this probably should be configurable in the new system. I haven't done that yet, though, because maybe this could be done together with the other changes for `_files' (using the same config key, I mean). And btw. this config key (`path_merge_*' or whatever) should probably allow to define this on a per-command and/or per-pattern basis. Which almost looks like a task for an array or association. Hm. Anyway. With cdablevars set doing `cd ' gave me `cd wischnow'. Rather irritating that. Bye Sven diff -u oldcompletion/Builtins/_cd Completion/Builtins/_cd --- oldcompletion/Builtins/_cd Fri Sep 17 09:32:39 1999 +++ Completion/Builtins/_cd Fri Sep 17 11:24:21 1999 @@ -67,7 +67,7 @@ # variable names, but it hardly seems worth it. # Note we need a tilde because cdablevars also allows user home # directories, hence we also need nonomatch to suppress error messages. - if [[ -o cdablevars && ! -d ${tdir::=${PREFIX%%/*}} && + if [[ -o cdablevars && -n "$PREFIX" && ! -d ${tdir::=${PREFIX%%/*}} && -d ${~tdir2::="~$tdir"} ]]; then PREFIX="~$PREFIX" _path_files -/ -- Sven Wischnowsky wischnow@informatik.hu-berlin.de