mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Patch cd.fish test to support older macOS versions
The sysctl kern.osproductversion is not available on the oldest versions we support.
This commit is contained in:
parent
57f558578b
commit
4b840075f4
@ -276,7 +276,8 @@ complete -C'cd .'
|
|||||||
# This is first supported on macOS 12.
|
# This is first supported on macOS 12.
|
||||||
# `sysctl kern.osproductversion` emits something like:
|
# `sysctl kern.osproductversion` emits something like:
|
||||||
# kern.osproductversion: 14.3.1
|
# kern.osproductversion: 14.3.1
|
||||||
if test (uname) = "Darwin" && test (sysctl kern.osproductversion | string match -r \\d+) -lt 12
|
# Note that there is no kern.osproductversion under older OS X releases!
|
||||||
|
if test (uname) = "Darwin" && test (sysctl kern.osproductversion 2>/dev/null | string match -r \\d+; or echo 10) -lt 12
|
||||||
# Not supported. Satisfy the CHECKs below.
|
# Not supported. Satisfy the CHECKs below.
|
||||||
echo fake/a
|
echo fake/a
|
||||||
echo fake/a/b
|
echo fake/a/b
|
||||||
|
Loading…
x
Reference in New Issue
Block a user