mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 11:47:04 +08:00
__fish_apropos: Also add "--" separator
This actually *worked* in my tests which confuses me. It really shouldn't, `apropos -foo` will complain about "-o" not being a valid option. It should be `apropos -- -foo`. Now, of course there are awful apropos implementations, so let's see if someone complains
This commit is contained in:
parent
d2fc1c47ac
commit
dfebfcf376
|
@ -30,13 +30,13 @@ function __fish_apropos
|
|||
set age (math (date +%s) - (/usr/bin/stat -f %m $db))
|
||||
end
|
||||
|
||||
MANPATH="$cache" apropos $argv
|
||||
MANPATH="$cache" apropos -- $argv
|
||||
|
||||
if test $age -ge $max_age
|
||||
mkdir -m 700 -p $cache
|
||||
/usr/libexec/makewhatis -o $db (man --path | string split :) >/dev/null 2>&1 </dev/null &
|
||||
end
|
||||
else
|
||||
apropos $argv
|
||||
apropos -- $argv
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user