diff --git a/pash b/pash index f5b7ff4..a29ae31 100755 --- a/pash +++ b/pash @@ -56,6 +56,10 @@ pw_add() { pw_del() { yn "Delete pass file '$1'?" && { rm -f "$1.gpg" + + # Remove empty parent directories of a password + # entry. It's fine if this fails as it means that + # another entry also lives in the same directory. rmdir -p "${1%/*}" 2>/dev/null } }