diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 8142ceb..d097c28 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -1,6 +1,6 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 -SETUVAR __fish_initialized:3100 +SETUVAR __fish_initialized:3400 SETUVAR fish_color_autosuggestion:969896 SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:b294bb diff --git a/update.sh b/update.sh index a304f7f..04df0f6 100755 --- a/update.sh +++ b/update.sh @@ -151,10 +151,25 @@ function load_gnome_terminal_profiles() { function install_fish() { echo "--- Ensuring fish is current shell" + local fish_good=0 if ! which fish 1>/dev/null then - echo "+++ Installing fish" - run sudo apt-get install -y fish + fish_good=1 + fi + + local current_version=$(fish --version | cut -d " " -f 3) + if [ $(echo "${current_version}\n3.4.0" | sort | head -1) != "3.4.0" ] + then + echo "Wrong version of fish ${current_version}" + fish_good=1 + fi + + if [ $fish_good -eq 1 ] + then + echo "+++ Installing fish from PPA" + run sudo add-apt-repository -y ppa:fish-shell/release-3 + run sudo apt update + run sudo apt install -y fish else echo "+++ Fish is installed" fi