Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add $- ~= i check as well as --no-activate override
While the $TERM checks might be antiquated, $TERM needs to be set for our color formatting to work, so they are still safe. Add the $- check here too, just in case. This should make loading Liquidprompt for tests quite safe. This whole line should be super POSIX safe. This is because we need to quietly exit without error if Liquidprompt is loaded in a non-interactive shell, even ones that aren't supported by the rest of Liquidprompt. The "x" prefixes on the vars are probably not needed, but some older shells might interpret a "-f" or similar as a flag to the "test" or "[" command instead of a string to compare. This ugly fix prevents that from happening. Also add the "${TERM-}" format so that if $TERM is not set while running under 'set -u', we can exit quietly instead of crash.
- Loading branch information