Open certik opened 2 months ago
Some ideas:
For shells like Bash or Zsh the shell running is always exported in the SHELL
environment variable.
@awvwgk great idea! Indeed, $SHELL
works, so we should just implement it and that will fix this for me.
Apparently there is also $0
:
$ echo $0
-bash
For shells like Bash or Zsh the shell running is always exported in the
SHELL
environment variable.
I think there is a difference between $SHELL
and $0
, as provided here:
I see. The $SHELL
environment variable is a shell that the user wants to be using for future shell invocations from various programs. That's a separate feature.
The main feature I want in this issue is to determine which shell I am running right now, and for that we need to implement $0
which will print the currently running program (shell).
The shell now looks identical to Bash! How can I tell which shell I am in? This morning I started in our shell, and I only noticed when git tab completion didn't work (#80) that I am not in Bash.