commit 2540a16728b6c50e48abef88e7086aa0262b44d5
parent 47efe6d61e4806e31a07fb3afff0d4978fb73437
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 18 Dec 2018 20:07:49 +0100
Fix file existence checks
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/links/.commands.sh b/links/.commands.sh
@@ -187,4 +187,4 @@ transfer() { # use transfer.sh to share files over the net
rm -f "$tmpfile"
echo ""
}
-[ -x ~/.shortcuts ] && source ~/.shortcuts
+[ -f ~/.shortcuts ] && source ~/.shortcuts
diff --git a/links/bin/shortcuts b/links/bin/shortcuts
@@ -22,7 +22,7 @@ echo "alias \\" > "$shell_shortcuts"
# Ensure text of argument 1 exists in the file argument 2
ensure() { (grep "$1" "$2")>/dev/null 2>&1 || echo "$1" >> "$2" ;}
-ensure "[ -x ~/.shortcuts ] && source ~/.shortcuts" "$shellrc"
+ensure "[ -f ~/.shortcuts ] && source ~/.shortcuts" "$shellrc"
ensure 'source ~/.config/ranger/shortcuts.conf' "$HOME/.config/ranger/rc.conf"
#ensure "config.source('shortcuts.py')" "$HOME/.config/qutebrowser/config.py"
#ensure "source $HOME/.config/fish/shortcuts.fish" "$HOME/.config/fish/config.fish"