aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2017-11-18 18:44:37 +0100
committerDaniel Hahler <git@thequod.de>2017-11-18 18:44:37 +0100
commit283a70768fd06ef6d503d0dad48fef95ed6683f1 (patch)
tree2f05c79a3be3aa58e0b73ea5331db6aca6a1dd9a
parentf1708decbd2cd632e8528ae8d1eecf9592d04975 (diff)
downloadrofi-pass-283a70768fd06ef6d503d0dad48fef95ed6683f1.tar.gz
checkIfPass: remove unnecessary `rm`
Uses `>|` to work also with the `noclobber` option being enabled.
-rwxr-xr-xrofi-pass3
1 files changed, 1 insertions, 2 deletions
diff --git a/rofi-pass b/rofi-pass
index 0f3edc2..5668eef 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -65,8 +65,7 @@ doClip () {
}
checkIfPass () {
- rm -f "$HOME/.cache/rofi-pass/last_used"
- printf '%s\n' "${root}: $selected_password" > "$HOME/.cache/rofi-pass/last_used"
+ printf '%s\n' "${root}: $selected_password" >| "$HOME/.cache/rofi-pass/last_used"
}