2006-02-08 10:20:43 +00:00
|
|
|
#
|
|
|
|
# This function is used internally by the fish command completion code
|
|
|
|
#
|
|
|
|
|
|
|
|
function __fish_describe_command -d "Command used to find descriptions for commands"
|
2012-08-03 01:19:43 +00:00
|
|
|
apropos $argv ^/dev/null | awk -v FS=" +- +" '{
|
2006-02-08 10:20:43 +00:00
|
|
|
split($1, names, ", ");
|
|
|
|
for (name in names)
|
2006-03-10 14:28:08 +00:00
|
|
|
if (names[name] ~ /^'"$argv"'.* *\([18]\)/ ) {
|
|
|
|
sub( "( |\t)*\\\([18]\\\)", "", names[name] );
|
2007-01-07 14:20:00 +00:00
|
|
|
sub( " \\\[.*\\\]", "", names[name] );
|
2006-02-08 10:20:43 +00:00
|
|
|
print names[name] "\t" $2;
|
|
|
|
}
|
|
|
|
}'
|
|
|
|
end
|
|
|
|
|