Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _absolute_command_paths: Make the display string the basename.
- X-seq: zsh-workers 39105
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _absolute_command_paths: Make the display string the basename.
- Date: Thu, 25 Aug 2016 18:36:42 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=4shxgfZA6YWKooBx1k7YO1qZ1zs=; b=Sh7cyO AH0ZkyCbsU35k4M+VUnxC8zYuix2N5BRA80STpiJlGxE6wb5+FPh670axi0tQY4S /XXwcqeeqt/6lhpczvem4T/PHMn6iXgXIhC08X1fTRrbi3i5qX8PAVX4GAUrYucI GjFMyeeOssNvH3MQkkZVYco9SlX0pd6AOJQ10=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=4shxgfZA6YWKooBx1k7YO1qZ1z s=; b=hV6gCONV3ZirzVSPnuINwqDztT+Apn4x2RcFXMrX9iaWLV0CMSiPP2pvgA hYlZx1NvSKFGYwn2HHy2GGPIt4swO39X34wlfT3LYJxCO6blL8kIGvJBsm2QWWwi 99+pMWoZYCDaw3o3kmJI8zCi1S/iv8VTfqaNXpaXWzGHSbTlg=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This makes better use of terminal real estate.
---
Completion/Unix/Type/_absolute_command_paths | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Type/_absolute_command_paths b/Completion/Unix/Type/_absolute_command_paths
index e9ab170..2daac65 100644
--- a/Completion/Unix/Type/_absolute_command_paths
+++ b/Completion/Unix/Type/_absolute_command_paths
@@ -7,7 +7,9 @@ _hashed_absolute_command_paths() {
integer ret=1
for i in $set_of_dirs_of_hashed_commands
do
- compadd -M "l:|=$i" "$expl[@]" -a 'commands[(R)${~i}[^/]#]'
+ local -a matches=( "${(@)commands[(R)${~i}[^/]#]}" )
+ local -a descs=( $matches:t )
+ compadd -M "l:|=$i" -d descs "$expl[@]" -a matches
ret=0
done
return ret
Messages sorted by:
Reverse Date,
Date,
Thread,
Author