From 73505e74cbc8fbaf30c58ec619963049bd2c5ca8 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sun, 7 Oct 2018 13:34:42 +0900 Subject: [PATCH] fix: use real target if fishfile is a symbolic link; close #460 --- fisher.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fisher.fish b/fisher.fish index 42d1acc..0e54f43 100644 --- a/fisher.fish +++ b/fisher.fish @@ -159,6 +159,8 @@ function _fisher_commit if test ! -e "$fishfile" command touch $fishfile echo "created empty fishfile in $fishfile" | command sed "s|$HOME|~|" >&2 + else if test -L "$fishfile" + set fishfile (command readlink $fishfile) end _fisher_fishfile_indent (echo -s $argv\;) < $fishfile > $fishfile@ command mv -f $fishfile@ $fishfile