Make sure dotfiles path of fish is set up correctly

This commit is contained in:
Thomas Lovén 2017-10-15 00:29:34 +02:00
parent f0f2988423
commit 64f51a60eb
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,8 @@
if test "$SHLVL" -le 1
set -x DOTFILES {$HOME}/dotfiles
set -x DOTFILES /Users/thomas/dotfiles
# The definition of $DOTFILES MUST be the first line of this file
# Don't change it!
if test "$SHLVL" -le 1
set -x PATH /usr/local/bin /usr/local/sbin $PATH
set -x PATH $DOTFILES/bin $PATH
if test -d $HOME/bin

View File

@ -18,6 +18,10 @@ function main()
# Install configuration files
makedir ${HOME}/.config
if ! head -n 1 ${DOTFILES}/fish/config.fish | grep ${DOTFILES} >/dev/null; then
sed -i '' "1s;.*;set -x DOTFILES ${DOTFILES};" ${DOTFILES}/fish/config.fish
fi
linkfile ${DOTFILES}/fish ${HOME}/.config/fish
print_ok "Fish shell installed"