mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-12 16:53:37 +08:00
7784a5f23c
This is really the only important place we're using it. See #5553.
11 lines
423 B
Fish
11 lines
423 B
Fish
#
|
|
# This function is used internally by the fish command completion code
|
|
#
|
|
|
|
function __fish_describe_command -d "Command used to find descriptions for commands"
|
|
command -sq apropos; or return
|
|
# Some systems could use -s 1,8 here, but FreeBSD doesn't have that.
|
|
apropos $argv 2>/dev/null | string replace -rf '^(\S+) \(\S+\)\s+- (.*)' '$1\t$2' \
|
|
| string match (string replace -a '*' '\*' -- "$argv")"*"
|
|
end
|