From: Danek Duvall <duvall@emufarm.org>
To: Zsh Workers <zsh-workers@sunsite.auc.dk>
Subject: Bug in _path_files?
Date: Thu, 2 May 2002 12:13:19 -0700 [thread overview]
Message-ID: <20020502191319.GA2807@lorien.emufarm.org> (raw)
I have strange behavior in zsh 4.0.3 when completing directories in the
stack:
% cd /usr/share/zsh; cd 4.0.3; cd functions
% dirs -v
0 /usr/share/zsh/4.0.3/functions
1 /usr/share/zsh/4.0.3
2 /usr/share/zsh
3 ~
% cd ~-2/^D
4.0.1-pre-2/ 4.0.3/ site-functions/
% cd ~+2/^D
functions/
% cd ~2/^D
functions/
The third form is the one I use all the time, but it seems to be wrong
here (it should have the output of the first form). I do have
pushdminus set, but it shouldn't make a difference, although it does.
The following patch fixes my symptoms and is correct as far as I can see
it. The idea being that without the +/-, you should jump directly to
the entry in $dirstack, rather than counting from one end or the other,
regardless of the value of pushdminus.
--- _path_files-4.0.3 Wed Oct 24 12:31:52 2001
+++ _path_files Thu May 2 12:01:46 2002
@@ -233,7 +233,7 @@
else
tmp1=$tmp1[2,-1]
fi
- [[ -o pushdminus ]] && tmp1=$(( $#dirstack - $tmp1 ))
+ [[ -o pushdminus && "$linepath" == [-+]* ]] && tmp1=$(( $#dirstack - $tmp1 ))
if (( ! tmp1 )); then
realpath=$PWD/
elif [[ tmp1 -le $#dirstack ]]; then
Thanks,
Danek
next reply other threads:[~2002-05-02 19:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-02 19:13 Danek Duvall [this message]
2002-05-03 10:52 ` Oliver Kiddle
2002-05-03 19:00 ` Danek Duvall
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=20020502191319.GA2807@lorien.emufarm.org \
--to=duvall@emufarm.org \
--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).