Created
October 30, 2015 15:55
-
-
Save SamirTalwar/e8bdbc024df7bf2dd6ea to your computer and use it in GitHub Desktop.
So both `export` and `local` swallow failure in both Bash and zsh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ foo=$(false); echo $? | |
| 1 | |
| $ export foo=$(false); echo $? | |
| 0 | |
| $ function bar { local foo=$(false); echo $?; }; bar | |
| 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment