1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00

39105: _hashed_absolute_command_paths: Make the display string the basename.

This makes better use of terminal real estate.
This commit is contained in:
Daniel Shahaf 2016-08-25 18:36:42 +00:00
parent b62d9eb63e
commit 1f00f68367
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
2016-08-27 Daniel Shahaf <d.s@daniel.shahaf.name>
* 39105: Completion/Unix/Type/_absolute_command_paths:
_hashed_absolute_command_paths: Make the display string the
basename.
* 39103: Completion/Unix/Type/_absolute_command_paths:
_typed-in_absolute_command_paths: Better handle non-empty
arguments that don't start with a slash.

View file

@ -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