Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.