1 2 3 4
#!/bin/sh pgrep emacs >/dev/null && exec bsdsetsid emacsclient -c "$@" >/dev/null exec nvim "$@"