TIL: When writing a bash/zsh function, "exit" does not behave the way I expected.

The entire terminal closed! 😂

Reply to this note

Please Login to reply.

Discussion

nostr:npub15tepx7lk826fa82s683nqw85lte8mn8e2ujg2gvxavkvxl9asx9qv82c9n Ha! Because it executes in the context of the current shell?

nostr:npub15tepx7lk826fa82s683nqw85lte8mn8e2ujg2gvxavkvxl9asx9qv82c9n It shouldn't close the terminal, unless you 'source' the script instead of executing it.