Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Separate cdpath elements in path-directories completion
- X-seq: zsh-users 28946
- From: Sebastian Stark <sstark+zsh@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Separate cdpath elements in path-directories completion
- Date: Sat, 18 Feb 2023 22:10:46 +0100
- Archived-at: <https://zsh.org/users/28946>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
I have several directories in $cdpath.
In tab completion on cd I have configured "local directory" to show up
first and then "directory in cdpath". That is almost perfect.
Is it possible to show a separate completion section for each element in
$cdpath? Looking at the code of _cd I can see that this is happening
(excerpt):
tmpcdpath=(${${(@)cdpath:#.}:#$PWD})
alt=( 'path-directories:directory in cdpath:_path_files -W tmpcdpath -/' )
So I guess it could be done by having my own copy of _cd that changes
this part of the code.
But perhaps there is a less invasive method I haven't discovered?
Sebastian
Messages sorted by:
Reverse Date,
Date,
Thread,
Author