completions/apt: Add quotes

Simple way to make the apt completions spew:

function apt; end

on a system without an apt command installed. (even if it isn't
Darwin, because this uses test combiners!)

This is a thing some people do to avoid learning other package managers.

(of course our completions would probably be *wrong* still, but at least they
won't spew a `test` error)
This commit is contained in:
Fabian Boehm 2022-10-30 11:25:52 +01:00
parent 7c680af4e3
commit 9948bc2264

View File

@ -2,7 +2,7 @@
# macOS has a /usr/bin/apt that is something else entirely:
# (apt - Returns the path to a Java home directory from the current user's settings)
if [ (uname -s) = Darwin -a (command -v apt) = /usr/bin/apt ]
if [ "$(uname -s)" = Darwin -a "$(command -s apt)" = /usr/bin/apt ]
exit 1
end