From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] _absolute_command_paths: Make the display string the basename.
Date: Thu, 25 Aug 2016 18:36:42 +0000 [thread overview]
Message-ID: <1472150202-22016-1-git-send-email-danielsh@fujitsu.shahaf.local2> (raw)
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
reply other threads:[~2016-08-25 18:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472150202-22016-1-git-send-email-danielsh@fujitsu.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).