mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
__fish_apropos: remove stale version check
Most macOS versions are affeced nowadays. Let's make this more predictable by applying the workaround to them all.
This commit is contained in:
@@ -5,9 +5,7 @@ if not type -q apropos
|
|||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check for macOS Catalina or above.
|
|
||||||
if test (__fish_uname) = Darwin
|
if test (__fish_uname) = Darwin
|
||||||
and test (string match -r "^\d+" "$(uname -r)") -ge 19
|
|
||||||
and test -x /usr/libexec/makewhatis
|
and test -x /usr/libexec/makewhatis
|
||||||
|
|
||||||
set -l dir
|
set -l dir
|
||||||
@@ -18,7 +16,7 @@ if test (__fish_uname) = Darwin
|
|||||||
end
|
end
|
||||||
|
|
||||||
function __fish_apropos -V dir
|
function __fish_apropos -V dir
|
||||||
# macOS 10.15 "Catalina" has a read only filesystem where the whatis database should be.
|
# macOS has a read only filesystem where the whatis database should be.
|
||||||
# The whatis database is non-existent, so apropos tries (and fails) to create it every time,
|
# The whatis database is non-existent, so apropos tries (and fails) to create it every time,
|
||||||
# which can take seconds.
|
# which can take seconds.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user