Fix warning message about fish <2.2.0

- `__fisher_log` doesn't work on <2.2.0 anymore so use `echo` instead
- `command -s` option not available on macOS, so use `type` instead
- `type -q` not available on fish <2.2.0,use `type brew >/dev/null 2>&1`
- `brew up` not needed anymore, it auto updates now
- `brew --HEAD` not needed, latest version is enough
This commit is contained in:
Francisco Lourenco 2017-02-10 18:02:00 +01:00
parent f359fa1c51
commit 0732e2485b

View file

@ -16,12 +16,12 @@ end
function $fisher_cmd_name -d "fish plugin manager"
switch "$FISH_VERSION"
case 2.1.2 2.1.1 2.1.0 2.0.0
__fisher_log error "You need fish &2.2.0& or higher to use fisherman."
echo "You need fish 2.2.0 or higher to use fisherman."
if command -s brew > /dev/null
__fisher_log info "Run &brew up; brew upgrade --HEAD fish&"
if type brew >/dev/null 2>&1
echo "Run: brew upgrade fish"
else
__fisher_log info "
echo "
Refer to your package manager documentation for
instructions on how to upgrade your fish build.
"