File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,7 @@ append_line() {
333333 [ -f " $file " ] && echo >> " $file "
334334 echo " $line " >> " $file "
335335 else
336- sed -i " ${at_lno} a\\ $ line" " $file "
336+ sed -i.~fzf_bak " ${at_lno} a\\ " $' \n ' " $ line" " $file " && rm " $file .~fzf_bak "
337337 fi
338338 echo " + Added"
339339 else
@@ -425,16 +425,16 @@ if [[ $shells =~ fish ]]; then
425425 echo " - Clear"
426426 echo
427427 if [[ $key_bindings -eq 1 && $auto_completion -eq 1 ]]; then
428- sed -i " \#$fzf_completion #d" " $bind_file "
429- sed -i " \#$fzf_key_bindings #d" " $bind_file "
428+ sed -i.~fzf_bak " \#$fzf_completion #d" " $bind_file " && rm " $bind_file .~fzf_bak "
429+ sed -i.~fzf_bak " \#$fzf_key_bindings #d" " $bind_file " && rm " $bind_file .~fzf_bak "
430430 append_line $update_config " fzf --fish | source" " $bind_file " " " " $lno_func "
431431 else
432- sed -i ' /fzf --fish \| source/d' " $bind_file "
432+ sed -i.~fzf_bak ' /fzf --fish \| source/d' " $bind_file " && rm " $bind_file .~fzf_bak "
433433 if [[ $key_bindings -eq 1 ]]; then
434- sed -i " \#$fzf_completion #d" " $bind_file "
434+ sed -i.~fzf_bak " \#$fzf_completion #d" " $bind_file " && rm " $bind_file .~fzf_bak "
435435 append_line $update_config " $fzf_key_bindings " " $bind_file " " " " $lno_func "
436436 elif [[ $auto_completion -eq 1 ]]; then
437- sed -i " \#$fzf_key_bindings #d" " $bind_file "
437+ sed -i.~fzf_bak " \#$fzf_key_bindings #d" " $bind_file " && rm " $bind_file .~fzf_bak "
438438 append_line $update_config " $fzf_completion " " $bind_file " " " " $lno_func "
439439 fi
440440 fi
You can’t perform that action at this time.
0 commit comments