Permalink
Browse files

functions.sh: Add failed commands to shell history.

It's nice to be able to just hit the up arrow to try the command again,
especially in the case when cryptsetup fails due to invalid password
entry, and you'd like a quick extra chance at entering your 93 character
long military grade password.

Signed-off-by: Piotr Karbowski <piotr.karbowski@gmail.com>
  • Loading branch information...
zx2c4 authored and Piotr Karbowski committed Nov 10, 2012
1 parent 853f838 commit ddb1076700e6317a29998170d546ea3a95bc8430
Showing with 1 addition and 0 deletions.
  1. +1 −0 sourceroot/functions.sh
View
@@ -37,6 +37,7 @@ run() {
else
eerror "'$@' failed."
echo "Failed: '$@'" >> /init.log
+ echo "$@" >> /.ash_history
rescueshell
fi
}

0 comments on commit ddb1076

Please sign in to comment.