Created
March 6, 2021 21:26
-
-
Save antoineMoPa/0f088480195f80ab043c857b0591d1fe to your computer and use it in GitHub Desktop.
.bashrc part to create the "e" alias that opens a file in your current emacs (if none, starts emacs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| emacsclient_and_start_emacs_if_needed () { | |
| if [ -z `pgrep emacs` ] | |
| then | |
| nohup emacs & | |
| sleep 1 | |
| fi | |
| emacsclient -n $1 | |
| } | |
| alias e="emacsclient_and_start_emacs_if_needed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment