Skip to content
Snippets Groups Projects
Commit 77592825 authored by Miles Whittaker's avatar Miles Whittaker
Browse files

Sometimes users prefer . instead of source

So only check for file name
parent ce53b9b2
No related branches found
No related tags found
No related merge requests found
......@@ -337,7 +337,11 @@ append_line() {
echo "Update $2:"
echo " - $1"
[ -f "$2" ] || touch "$2"
line=$(\grep -nF "$1" "$2" | sed 's/:.*//')
if [ $# -lt 3 ]; then
line=$(\grep -nF "$1" "$2" | sed 's/:.*//')
else
line=$(\grep -nF "$3" "$2" | sed 's/:.*//')
fi
if [ -n "$line" ]; then
echo " - Already exists (line #$line)"
else
......@@ -349,7 +353,7 @@ append_line() {
echo
for shell in bash zsh; do
append_line "source ~/.fzf.${shell}" ~/.${shell}rc
append_line "source ~/.fzf.${shell}" ~/.${shell}rc "~/.fzf.${shell}"
done
if [ $key_bindings -eq 0 -a $has_fish -eq 1 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment