News for hackers. Stuff that matters.
Re:A heads up display for git by michaelallen on Wednesday August 26, 2015 @09:56AM (#10122832)
I did try that on a previous tool Butler (https://github.com/michaeldfallen/butler) but I found that some shells don't actually set `$SHELL`.
Re:A heads up display for git by laumars on Wednesday August 26, 2015 @11:17AM (#10123461)
Some don't, but $SHELL is generally accurate enough for Bash and Zsh.

You can also check the shell by checking the PID:

  ps -p $$
But then you need to do extra output parsing plus, obviously, ps each time you output $PS1. Which is going to be a little overkill for this project since it's only Zsh and Bash you're wanting to capture and you can always have fallback support for those flags when automatic detection fails.