mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-31 20:17:14 +08:00
Revert "__fish_describe_command: print only exact match and exit"
This reverts commit 535845861a
.
That commit introduced a bug where tab-completing commands no longer
prints their descriptions, unless there is an exact match.
This commit is contained in:
parent
4116829292
commit
a1494c9c22
|
@ -32,11 +32,10 @@ function __fish_describe_command -d "Command used to find descriptions for comma
|
|||
apropos $argv 2>/dev/null | awk -v FS=" +- +" '{
|
||||
split($1, names, ", ");
|
||||
for (name in names)
|
||||
if (names[name] ~ /^'"$argv_regex"'[^A-z._-]* *\([18]\)/ ) {
|
||||
if (names[name] ~ /^'"$argv_regex"'.* *\([18]\)/ ) {
|
||||
sub( "( |\t)*\\\([18]\\\)", "", names[name] );
|
||||
sub( " \\\[.*\\\]", "", names[name] );
|
||||
print names[name] "\t" $2;
|
||||
exit;
|
||||
}
|
||||
}'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user