Permalink
Browse files

added the `/bin/` prefix for `rm` and `mv`, because those two are oft…

…en aliased in many configurations
  • Loading branch information...
w9 committed Jul 22, 2015
1 parent ade4ee2 commit 1431b185c8e73a6b0e761ca823d9bc18767a005e
Showing with 3 additions and 3 deletions.
  1. +3 −3 bashmarks.sh
View
@@ -144,14 +144,14 @@ function _purge_line {
if [ -s "$1" ]; then
# safely create a temp file
t=$(mktemp -t bashmarks.XXXXXX) || exit 1
trap "rm -f -- '$t'" EXIT
trap "/bin/rm -f -- '$t'" EXIT
# purge line
sed "/$2/d" "$1" > "$t"
mv "$t" "$1"
/bin/mv "$t" "$1"
# cleanup temp file
rm -f -- "$t"
/bin/rm -f -- "$t"
trap - EXIT
fi
}

0 comments on commit 1431b18

Please sign in to comment.