Closed FranklinYu closed 3 years ago
@FranklinYu thanks for the feedback! This should already be accounted for in:https://github.com/rcaloras/bash-preexec/blob/7884535ed423ac27d3b6b473c61b1fe41905aca1/bash-preexec.sh#L321-L324
This line should effectively cause this script to exit with 1
when trying to source with zsh or any shell other than Bash. Please let me know if I'm mistaken.
Thank you very much. I have noticed this line, but it is very late in the script. At that time all the functions and variables are already there. How about moving this 4 lines to the top?
Noticed this when you first posted, but didn't give it much thought. Thanks for the feedback! Updated in https://github.com/rcaloras/bash-preexec/pull/114 Let me know if you have something else in mind.
This might sound weird, but some users choose to source this script for both Bash and Zsh. I think it doesn’t harm to have something like this in the beginning: