zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Path completion causing ambiguous path tail to disappear
Date: Mon, 21 Feb 2000 10:12:01 +0100 (MET)	[thread overview]
Message-ID: <200002210912.KAA04708@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Mon, 21 Feb 2000 04:11:19 +0000


Bart Schaefer wrote:

> This is not exactly a complaint, because I can (almost) get the behavior I
> want by using a style ... rather it's a question of whether the default
> behavior should be different.
> 
> I have my zsh sources under /usr/src/local/zsh/.  With dev-19:
> 
> zagzig[36] cd /usr/s/l/<TAB>
> 
> The valid completions at this point should be
> 
> /usr/src/local	/usr/src/linux /usr/share/libtool /usr/share/locale
> 
> However, what happens is that the word on the command line is *shortened*,
> leaving me with
> 
> zagzig[36] cd /usr/s/
> 
> with the cursor on top of the final `/'.  Now, I don't mind the cursor
> moving back to that point if that's where I need to disambiguate, but I
> was surprised that zsh deleted the tail of the path rather than simply
> feeping, or displaying the list.

Slight problem with building the correct $SUFFIX for testing.

Bye
 Sven

diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files
--- ../z.old/Completion/Core/_path_files	Fri Feb 18 15:42:42 2000
+++ Completion/Core/_path_files	Mon Feb 21 10:11:36 2000
@@ -420,13 +420,13 @@
     fi
 
     if [[ "$tpre" = */* ]]; then
-      PREFIX="${donepath}${linepath}${cpre}${tpre%%/*}"
-      SUFFIX="/${tsuf#*/}"
       tmp2="${cpre}${tpre%%/*}"
+      PREFIX="${donepath}${linepath}${tmp2}"
+      SUFFIX="/${tpre#*/}${tsuf#*/}"
     else
-      PREFIX="${donepath}${linepath}${cpre}${tpre}"
-      SUFFIX="${tsuf}"
       tmp2="${cpre}${tpre}"
+      PREFIX="${donepath}${linepath}${tmp2}"
+      SUFFIX="${tsuf}"
     fi
 
     if (( tmp4 )) ||

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-02-21  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-21  9:12 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-21  4:11 Bart Schaefer
2000-02-21  7:26 ` Andrej Borsenkow

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=200002210912.KAA04708@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).