From 1ba16634dedb08bf000fc020be3e18ff40258c86 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Thu, 22 Apr 2021 19:05:29 +0100 Subject: [PATCH] fix: fish/nvim --- files/.config/fish/fish_plugins | 1 - scripts/install.d/02-fish.sh | 6 ++++++ scripts/install.d/16-vim.sh | 20 +++++++++++--------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/files/.config/fish/fish_plugins b/files/.config/fish/fish_plugins index 6048da1..949607f 100644 --- a/files/.config/fish/fish_plugins +++ b/files/.config/fish/fish_plugins @@ -1,5 +1,4 @@ jethrokuan/z -jorgebucaran/fisher jorgebucaran/hydro jorgebucaran/replay.fish joseluisq/gitnow diff --git a/scripts/install.d/02-fish.sh b/scripts/install.d/02-fish.sh index 3f60092..4f38059 100755 --- a/scripts/install.d/02-fish.sh +++ b/scripts/install.d/02-fish.sh @@ -1,6 +1,12 @@ #!/usr/bin/env bash fish --version +current_shell=`readlink -f /proc/$$/exe` +fish_shell=`which fish` +if [[ "$current_shell" != "$fish_shell" ]]; then + chsh -s "$fish_shell" +fi + fisher_location="$XDG_CONFIG_HOME/fish/functions/fisher.fish" if ! [ -f $fisher_location ]; then fish -c "curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher" diff --git a/scripts/install.d/16-vim.sh b/scripts/install.d/16-vim.sh index 98ac9b6..1d19578 100755 --- a/scripts/install.d/16-vim.sh +++ b/scripts/install.d/16-vim.sh @@ -1,15 +1,17 @@ #!/usr/bin/env bash # Install neovim from unstable debian repo -curl -fsSL "https://ftp-master.debian.org/keys/archive-key-10.asc" | sudo apt-key add - -echo "deb http://deb.debian.org/debian unstable main" \ - | sudo tee /etc/apt/sources.list.d/unstable.list -echo "Package: neovim -Pin: release a=unstable -Pin-Priority: 900" \ - | sudo tee /etc/apt/preferences.d/neovim -update -install neovim +if ! bin_in_path "nvim"; then + curl -fsSL "https://ftp-master.debian.org/keys/archive-key-10.asc" | sudo apt-key add - + echo "deb http://deb.debian.org/debian unstable main" \ + | sudo tee /etc/apt/sources.list.d/unstable.list + echo "Package: neovim + Pin: release a=unstable + Pin-Priority: 900" \ + | sudo tee /etc/apt/preferences.d/neovim + update + install neovim +fi mkdir -p "$XDG_DATA_HOME/nvim/backup" plug_dir="$XDG_DATA_HOME/nvim/site/autoload"