Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Dynamic named directories and completion
- X-seq: zsh-users 23167
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Dynamic named directories and completion
- Date: Sat, 24 Feb 2018 19:34:20 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1519500861; bh=4FtZ7s1UJoVb+Mtv+RvNjOOU/BWBgQ798RVf0Gh7gxs=; h=Date:From:To:Subject:In-Reply-To:References; b=R4Lbnt8NiwcWjDZscgCehdJPC7ucHwc1kfAk2QGXR1/l0KWJ6keN83rnkf+mYp0kZ TRNdK4U5nCOoc30rm5MZ5RcfN32HZyk+K9Fa7CNYXXf2aXrwhA/lZosfiecZYxUKLo uYUdXYTrGEzcoXiVN/dyQLV5ChAlCB2vDm4LwXVA8XK1r+bdwTSpAqlpJSeYJdQ6+m /AFeBcsnMGhWTb4ZTv9NmpnuCTjEYrHgpfpcB19B8/fmQydIpV1rMdc235Eq9UulgI HKs4AmjLwhGA53Et6O18qjswfZx++wPFPs7rtQHgJsSi4OmLgQz4qBLwVVSvtF+hjn WHwtTglzCvgDw==
- In-reply-to: <p6p952$9mi$2@blaine.gmane.org>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <p6nhj1$5nv$1@blaine.gmane.org> <m3po4wnni0.fsf@luffy.cx> <p6p952$9mi$2@blaine.gmane.org>
On Fri, 23 Feb 2018 09:42:37 -0500
Scott Frazer <frazer.scott@xxxxxxxxx> wrote:
> >> cd ~[ccc]/<TAB>
> >>
> >> zsh doesn't give me options for directories under ccc, it thinks '/' is
> >> the command I'm trying to complete. Is there a way to make this work?
> >
> > I don't see anything wrong in your code and for me, it works as you
> > expect (zsh 5.4.2). Does "echo ~[ccc]" returns the right value?
> >
>
> Yes, "echo ~[ccc]" works correctly. I'm using zsh 5.3 so maybe there is some
> difference there. Perhaps there is some difference in options/modules/etc. If
> I cut my .zshrc down to a minimum:
There's something screwy here, certainly. I don't think it should be
necessary to modify _path_files in 5.3, though, there are certainly
cases where you get the right answer, and I think the logic that currently
handles ~ at the start should do the right thing here.
I've a theory it's down to the completion widget in use, i.e. how
completion gets started up. If instead of hitting tab, you type <Esc>x
complete-word<Enter> --- or instead bind that widget,
bindkey '^i' complete-word
and then use tab --- does it start working? The default is
expand-or-complete, and I believe the expand bit is nixing the
completion in this case. (Except we don't really have the word "nix"
this side of the Atlantic, so I may be talking nonsense, but it sounded
good.)
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author