Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion of ~ to include dirstack?
- X-seq: zsh-users 11950
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Completion of ~ to include dirstack?
- Date: Sun, 07 Oct 2007 11:51:47 -0700
- In-reply-to: <2d0f097e0710062023x3f2b18c8n84b8b89b9a287c97@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d0f097e0710062023x3f2b18c8n84b8b89b9a287c97@xxxxxxxxxxxxxx>
On Oct 7, 1:23pm, Boyd Adamson wrote:
} Subject: Completion of ~ to include dirstack?
}
} What I'd really like is this completion:
}
} % cd ~<tab>
}
} to include a section with the directory stack.
Type ctrl-x h instead of tab and you'll see something like:
% cd ~
tags in context :completion::complete:-tilde-::
users named-directories directory-stack (_tilde)
users (_users _tilde)
This indicates that tilde completion is already considering the
directory stack for inclusion. Ordinarly you'd control what appears
in the listing with
zstyle :completion::complete:-tilde-:: tag-order ...
and the order in which they appear with
zstyle :completion::complete:-tilde-:: group-order ...
However, in this case the directory stack is being handled by the
_directory_stack completer, and that completer ignores strings that
do not match "[-+]*", so with just a bare tilde none of the stack
entries are considered candidates.
So the only way to get what you want is to rewrite _directory_stack,
or rewrite _tilde to call something else to get the stack entries.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author