Adds fish shell rc; supports fish shell in Vim

This commit is contained in:
William Carroll 2017-01-17 17:51:35 -05:00
parent 3958a7c10d
commit 8ca1874d15
3 changed files with 35 additions and 0 deletions

View file

@ -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 ""