Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Complete certain external commands separately by path?
- X-seq: zsh-users 22896
- From: dana <dana@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Complete certain external commands separately by path?
- Date: Mon, 11 Sep 2017 21:08:44 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=CgGo9dcm9qEwOPWyFTyx7uKsC55804DJ8NlTKpCPEiM=; b=Tfs7UDOOtGpSSDdF4BmTd4JLx7qIUwptGuge2rF5/4z1WUPlRmpiWL+Q8Eii/wuZVg gt3QzZM+ltl4mDtblgqlk1z+T8KI2hfeaqtjycIM5XT+akraBKrXxtpUEZ7q4p6PJAVr 1zz2YyBK2ywgwWHWwKRzeky/LsE56jm/vXiFdre0Xz2eT13RZu5STMpJCaEuvqpUOV2f 0Hn43QF4j5RtnYyjPjtV8VqoYSyNAmKc3+13RooweOKf0so4ULNWlDLhZLkrf7bfkJc6 GfukFNuIJocpP5DH8pxTa6FKQttQzzI0pJMlMDtnTvWM/7AVtLt3tioIDALg3weu7Cix gYPQ==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hey again,
I have a problem that i hope can be solved with `zstyle` somehow: I want to
make it so that when i complete external commands, zsh gives me the
possibilities from one particular directory ahead of (and ideally separate
from) all the others. Seems like the most reasonable way to do that might
be to create some kind of sub-group that i can put up top with `zstyle ...
group-order` or whatever?
Here's a contrived illustration of what i mean:
Given a PATH like this:
% print $PATH
/bin1:/bin2
And executables spread across that PATH like this:
% ls /bin1 /bin2
/bin1:
foo1 foo2
/bin2:
foo3 foo4
My current completion behaviour looks like this:
% foo<tab>
completing external command:
foo1 foo2 foo3 foo4
What i *want* is to pull the /bin2 possibilities out into their own group
so i can have them completed first — so i'd have something like this:
% foo<tab>
completing favoured external command:
foo3 foo4
completing external command:
foo1 foo2
Is there an easy way to do this?
Cheers!
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author