Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure script can be sourced or copied and pasted (#32)
- if sourced, the script will `exit`, instead of the old behavior, which generated a second login shell atop the first one - if copied and pasted, the script will `return` without exiting and closing the current shell - if not sourced, then `$0` is likely `-sh` or `sh` (or `-zsh` or `zsh`), which, without a leading login hyphen `-`, is a terminating substring of `${SHELL##*/}`; this heuristic will determine the appropriate behavior - the script no longer calls `exec -l`, which, even obfuscated, is not defined by POSIX Signed-off-by: Lucas Larson <[email protected]>
- Loading branch information