mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 08:56:43 +08:00
Fix man
completions on macOS with symlinked manpath
When `manpath` prints a symlink to a directory, `/usr/libexec/makewhatis` ignores the entire directory: ``` $ /usr/libexec/makewhatis -o /tmp/whatis \ (/usr/bin/manpath | string split :) makewhatis: /Users/wiggles/.nix-profile/share/man: Not a directory ``` This means that the built-in `man` completions will not index any commands in these directories. If we pass the directories to `readlink -f` first, `makewhatis` correctly indexes the `man` pages. ``` $ /usr/libexec/makewhatis -o /tmp/whatis \ (/usr/bin/manpath | string split : | xargs readlink -f) ```
This commit is contained in:
parent
bc55945072
commit
a6c8cd6e85
|
@ -40,7 +40,7 @@ if test $status -eq 0 -a (count $sysver) -eq 3
|
|||
|
||||
if test $age -ge $max_age
|
||||
test -d "$dir" || mkdir -m 700 -p $dir
|
||||
/usr/libexec/makewhatis -o "$whatis" (/usr/bin/manpath | string split :) >/dev/null 2>&1 </dev/null &
|
||||
/usr/libexec/makewhatis -o "$whatis" (/usr/bin/manpath | string split : | xargs readlink -f) >/dev/null 2>&1 </dev/null &
|
||||
disown $last_pid
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user