zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] _absolute_command_paths: Make the display string the basename.
@ 2016-08-25 18:36 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2016-08-25 18:36 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-25 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25 18:36 [PATCH] _absolute_command_paths: Make the display string the basename Daniel Shahaf

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).