From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Mailing-list zsh-users <zsh-users@sunsite.auc.dk>
Subject: Re: [zsh 4.0.1 bug] filename completion
Date: Tue, 26 Jun 2001 05:15:01 +0000 [thread overview]
Message-ID: <1010626051501.ZM24562@candle.brasslantern.com> (raw)
In-Reply-To: <4a9061759cvincent@vinc17.org>
On Jun 26, 1:01am, Vincent Lefevre wrote:
} Subject: [zsh 4.0.1 bug] filename completion
}
} scripts/ share/ software/ sparc-solaris/ src/
}
} When I type "cd so", "cd sof", "cd softw", "cd softwa"... and try
} to complete, I get "cd software/". But when I type "cd soft" and
} try to complete, nothing happens. Note that here, soft is a named
} directory, but the above behaviour should be incorrect.
It took me a while to figure out which "above behavior" you meant.
The situation seems to be that you have CDABLE_VARS set and `soft' is
the name of the variable.
Either the handling of named directories by _cd is broken, or the
handling of named directories by _path_files is; I'm not sure which,
and it may even be both.
_cd doesn't even try to complete other directories if the prefix is the
name of a cdable variable, which is arguably wrong.
But even so, after _cd sets PREFIX="~$PREFIX" and calls _path_files, the
completion gets botched somehow ... _path_files calls (eventually the
equivalent of, at line 326)
tmp1=( ~soft/ )
compfiles -p tmp1 accex '' '' fake '*(-/)'
The trouble there seems to be that compfiles tries to match ~soft/*(-/) to
~soft and (obviously) fails. The slash is getting added at line 254 of
_path_files; my guess is that needs to become conditional on whether the
prefix originally contained a slash, but that means in turn that the test
on line 255 has to change, etc.
I fooled around with _cd a bit and got something that works, but I'm not
happy with it, so I'm going to hope that Sven has a better idea of what's
going on.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
next prev parent reply other threads:[~2001-06-26 5:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-25 23:01 Vincent Lefevre
2001-06-26 5:15 ` Bart Schaefer [this message]
2001-06-26 8:35 ` Andrej Borsenkow
2001-06-26 9:01 ` Sven Wischnowsky
2001-06-26 10:10 ` Vincent Lefevre
2001-06-26 10:28 ` Andrej Borsenkow
2001-06-26 11:06 ` Vincent Lefevre
2001-06-26 11:18 ` Sven Wischnowsky
2001-06-26 13:28 ` Vincent Lefevre
2001-06-26 13:29 ` Sven Wischnowsky
2001-06-26 13:37 ` Vincent Lefevre
2001-06-26 13:49 ` Sven Wischnowsky
2001-06-26 9:41 ` Vincent Lefevre
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=1010626051501.ZM24562@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=zsh-users@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).