-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support "logout" code #35
Labels
Comments
+1 |
Couldn't you just do something like... function tear_down() {
# Checkout all this fancy tear down code
}
alias exit="tear_down && exit" |
seems to be ignored when hitting ctrl+d (at least on osx) |
Perhaps you can make use of See http://superuser.com/questions/549875/what-method-executes-on-bash-exit-via-ctrl-d |
using zsh function tear_down() {
# fancy tear down code
}
trap "tear_down" EXIT works for me |
Looks like @skvale's solution is the way to go. If this doesn't meet anyone's usecase, please comment. Closing until then. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey i have this desk that is connecting me to a VPN and does some more stuff,
it would be great if i could define some "teardown" or "logout" phase in my vpn.sh that is closing the VPN connecting and cleaning up.
similar to what .bash_logout would do.
The text was updated successfully, but these errors were encountered: