diff --git a/bashmarks.sh b/bashmarks.sh index 5f6bfaf..0bf3ec6 100644 --- a/bashmarks.sh +++ b/bashmarks.sh @@ -133,12 +133,12 @@ function _compzsh { function _purge_line { if [ -s "$1" ]; then # safely create a temp file - t=$(mktemp -t bashmarks) || exit 1 + t=$(mktemp -t bashmarksXXXXXXXX) || exit 1 trap "rm -f -- '$t'" EXIT # purge line sed "/$2/d" "$1" > "$t" - mv "$t" "$1" + mv -f "$t" "$1" # cleanup temp file rm -f -- "$t"