Skip to content

Instantly share code, notes, and snippets.

@DiegoSalazar
Last active September 22, 2016 16:31
Show Gist options
  • Save DiegoSalazar/ecf01c08470c7553875443722b30c91e to your computer and use it in GitHub Desktop.
Save DiegoSalazar/ecf01c08470c7553875443722b30c91e to your computer and use it in GitHub Desktop.
Prevents accidentally exiting the shell
# Prevent me from accidentally exiting the shell
exit() {
echo "Exit the shell? y/n"
read a
if [ "$a" = "y" ]; then
builtin exit
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment