Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cd /u/N/v/ tab expansion
- X-seq: zsh-users 27652
- From: Tomasz Pala <gotar@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: cd /u/N/v/ tab expansion
- Date: Sun, 10 Apr 2022 03:04:41 +0200
- Archived-at: <https://zsh.org/users/27652>
- In-reply-to: <CAH+w=7b6u-pSNXSDG3-M49U62WTUuU7XAL9B2Zp8Jj+va8bPrg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <860877fd-ec69-0323-3f2a-8a40e96e6aee@rayninfo.co.uk> <CAH+w=7ZtQVCJDCe0OAXPKRUa8zU1kgDMDu-y82BvHmOk+reYRw@mail.gmail.com> <2b388cce-1412-36cd-9a90-d58f853ee830@rayninfo.co.uk> <CAH+w=7b6u-pSNXSDG3-M49U62WTUuU7XAL9B2Zp8Jj+va8bPrg@mail.gmail.com>
On Thu, Apr 07, 2022 at 16:11:37 -0700, Bart Schaefer wrote:
>> One issue I had was that it was only offering me two of the possible 6
>> sub-directories
>
> If you look at my example, I was only offered libexec and local even
> though there is a /usr/lib directory. But there's no file matching
> "b*" in /usr/lib, so "lib" is excluded.
I've stuck with this problem month ago...
$ cd /e/s/s/[tab]
No matches for: `directory'
while
$ cd /e/s/s[tab] -- note the missing '/' at the end works.
$ cd /etc/s/s/i[tab]
No matches for: `directory'
-- I got /etc/systemd/system/input.target.wants/ there.
It seems the problem is the ambiguousness of the 's'.
There are other oddities:
$ cd /u/s/e/s[tab]
No matches for: `directory'
$ ls /u/s/e/s[tab]
ekg2/session-en.txt ekg2/session-pl.txt epsg_csv/stateplane.csv epsg_csv/supersession.csv
while there is /usr/share/ekg2/scripts directory...
$ ls /usr/src/l/drivers/n/ethernet/i[tab]
No matches for: `files' or `directory'
$ ls /usr/src/l/drivers/net/ethernet/i[tab] -- 'n' replaced with 'net'
directory
linux-4.4-4.4.14/drivers/net/ethernet/i825xx/ linux-4.4/drivers/net/ethernet/i825xx/ linux-5.9.6/drivers/net/ethernet/i825xx/
linux-4.4-4.4.14/drivers/net/ethernet/ibm/ linux-4.4/drivers/net/ethernet/ibm/ linux-5.9.6/drivers/net/ethernet/ibm/
linux-4.4-4.4.14/drivers/net/ethernet/intel/ linux-4.4/drivers/net/ethernet/intel/ linux-5.9.6/drivers/net/ethernet/intel/
$ ls /usr/src/linux-5.9.6/drivers/net/e/i/e/e[tab]
No matches for: `files' or `directory'
e.g. /usr/src/linux-5.9.6/drivers/net/ethernet/ibm/ehea/ehea.h existing
there matches and should be presented.
Simple test:
$ mkdir -p a/{b1,b2}/d/{e1,e2}/g
$ cd a/b/d/e/g[tab] == nothing
$ cd a/b1/d/e/g[tab] == e1/g e2/g
The problem was this single line:
zstyle ':completion:*:*:*:*' list-suffixes yes
--
Tomasz Pala <gotar@xxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author