From 8ca1874d1527f09336b758600e828ee1e5c74db5 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 17 Jan 2017 17:51:35 -0500 Subject: Adds fish shell rc; supports fish shell in Vim --- configs/.vimrc | 9 +++++++++ configs/config.fish | 2 ++ configs/setup_configs.sh | 24 ++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 configs/config.fish diff --git a/configs/.vimrc b/configs/.vimrc index 5c997fb78fa2..e7a06d70ec51 100644 --- a/configs/.vimrc +++ b/configs/.vimrc @@ -1,3 +1,9 @@ +" Set shell variable to "sh" if current shell is "fish shell" +if &shell =~# 'fish$' + set shell=sh +endif + + " -- BEGIN: Vundle config -- set nocompatible " be iMproved, required filetype off " required @@ -91,6 +97,9 @@ Plugin 'zanglg/nova.vim' " Emulates Emacs's Helm Swoop search Plugin 'pelodelfuego/vim-swoop' +" Fish Shell support +Plugin 'dag/vim-fish' + call vundle#end() " required filetype plugin indent on " required " Put your non-Plugin stuff after this line diff --git a/configs/config.fish b/configs/config.fish new file mode 100644 index 000000000000..3007bb9d5306 --- /dev/null +++ b/configs/config.fish @@ -0,0 +1,2 @@ +set autojump_ex "/usr/local/share/autojump/autojump.fish" +[ -f $autojump_ex ]; and source $autojump_ex diff --git a/configs/setup_configs.sh b/configs/setup_configs.sh index dd1f55eef7fc..5e56e51402d0 100755 --- a/configs/setup_configs.sh +++ b/configs/setup_configs.sh @@ -36,3 +36,27 @@ for i in {1..5}; do fi echo "" done + + +# Fish Shell is a special case +cf_dir="${HOME}/.configs/fish" +cf="config.fish" + +if [ -f "${cf_dir}/${cf}" ] && [ ! -L "${cf_dir}/${cf}" ]; then + echo -n "Backing up ${cf} ... " && \ + mv "${cf_dir}/${cf}" "${HOME}/${cf}.bak" && \ + echo "Done." +fi + +if [ -L "${cf_dir}/${cf}" ]; then + if [ $(readlink "${cf_dir}/${cf}") = "${pc_settings_path}/configs/${cf}" ]; then + echo "Already properly symlinked to \"${pc_settings_path}/configs\"." + else + echo "Already symlinked but NOT to the proper location. Aborting..." + fi +else + echo -n "Symlinking to ${pc_settings_path}/configs/${cf} ... " && \ + ln -s "${pc_settings_path}/configs/${cf}" "${cf_dir}/${cf}" && \ + echo "Done." +fi +echo "" -- cgit 1.4.1