zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: A couple of bugs
Date: Mon, 3 Apr 2000 13:31:50 +0200 (MET DST)	[thread overview]
Message-ID: <200004031131.NAA31584@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Oliver Kiddle's message of Mon, 03 Apr 2000 10:51:54 +0100


Oliver Kiddle wrote:

> ...
> 
> The second bug is that completion after ~+ or ~- seems to have been
> broken since dev-19:
>   cd ~+1/<tab>
>   unknown user `+1'
> Here I would expect file completion after the appropriate directory
> from the stack. The problem is also the case for named directories.

_path_files just wasn't able to handle the directory stack entries.

Bye
 Sven

Index: Completion/Core/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v
retrieving revision 1.3
diff -u -r1.3 _path_files
--- Completion/Core/_path_files	2000/04/03 11:05:16	1.3
+++ Completion/Core/_path_files	2000/04/03 11:30:21
@@ -170,6 +170,23 @@
     realpath="${userdirs[$linepath]%/}/"
   elif (( $+nameddirs[$linepath] )); then
     realpath="${nameddirs[$linepath]%/}/"
+  elif [[ "$linepath" = [-+][0-9]## ]]; then
+    if [[ "$linepath" = -* ]]; then
+      tmp=$(( $#dirstack $linepath ))
+    else
+      tmp=$linepath[2,-1]
+    fi
+    [[ -o pushdminus ]] && tmp=$(( $#dirstack - $tmp ))
+    if (( ! tmp )); then
+      realpath=$PWD/
+    elif [[ tmp -le $#dirstack ]]; then
+      realpath=$dirstack[tmp]/
+    else
+      _message 'not directory stack entries'
+      return 1
+    fi
+  elif [[ "$linepath" = [-+] ]]; then
+    realpath=${~:-\~$linepath}/
   else
     _message "unknown user \`$linepath'"
     return 1

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


             reply	other threads:[~2000-04-03 11:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-03 11:31 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-04-03  9:51 Oliver Kiddle
2000-04-03 10:11 ` Bart Schaefer
1999-03-03 10:52 Sven Wischnowsky

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=200004031131.NAA31584@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).