I want to have my .bashrc detect if running emacsclient would work in lieu of running emacs. Basically:
if emacs_server_is_running; then
EDITOR=emacsclient
VISUAL=emacsclient
else
EDITOR=emacs
VISUAL=emacs
fi
What would I put in the emacs_server_is_running
function to accomplish this aim?