Revert "Optimize current_shell helper"

This reverts commit 55074092d0a105ab7b287e031a1ea789bf19ed73.

Turns out that this optimization was incorrect, since `$SHELL` need not
be set to the current shell, but just the default startup shell.