From 0732e2485b0d944b4425f7c48e61879c89e5e3d8 Mon Sep 17 00:00:00 2001 From: Francisco Lourenco Date: Fri, 10 Feb 2017 18:02:00 +0100 Subject: [PATCH 1/2] 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 --- fisher.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fisher.fish b/fisher.fish index 3456ab1..48d6f5c 100644 --- a/fisher.fish +++ b/fisher.fish @@ -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. " From 585787d60e0fc48de81b2567f630ea51e78df04b Mon Sep 17 00:00:00 2001 From: Francisco Lourenco Date: Fri, 10 Feb 2017 18:52:38 +0100 Subject: [PATCH 2/2] Add notice about fish <2.3.0 and snippet support --- fisher.fish | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/fisher.fish b/fisher.fish index 48d6f5c..0761337 100644 --- a/fisher.fish +++ b/fisher.fish @@ -28,6 +28,30 @@ function $fisher_cmd_name -d "fish plugin manager" end return 1 + + case 2.2.0 + __fisher_log info " + You need fish 2.3.0 or higher to take advantage of snippets. + Without it some plugins might not work. + " + + if type -q brew + __fisher_log info "Please run &brew upgrade fish&" + else + __fisher_log info " + + Refer to your package manager documentation + for instructions on how to upgrade your fish build. + + If you can not upgrade, append the following code + to your ~/.config/fish/config.fish: + + &for file in ~/.config/fish/conf.d/*.fish& + &source $file& + &end& + + " + end end set -g fisher_version "2.12.0"