Mercurial > dotfiles
annotate unixSoft/otherbin/emacs.sh @ 522:7983184eb8d8
emacs.sh: hack together fallback to vscode
Lately if emacs is not running I prefer using vscode. This allows
my muscle memory to keep working.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 31 Jul 2022 22:34:33 -0400 |
parents | b403402153b5 |
children |
rev | line source |
---|---|
33
b403402153b5
Add some setup to make emacs easier to use on OS X.
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
b403402153b5
Add some setup to make emacs easier to use on OS X.
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
2 if [ "`uname`" = "Darwin" ] ; then |
522
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
3 if hash code 2>/dev/null ; then |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
4 if [ "$1" = "-n" ] ; then |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
5 shift |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
6 code "$@" |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
7 else |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
8 code --wait "$@" |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
9 fi |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
10 else |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
11 open -a emacs "$@" |
7983184eb8d8
emacs.sh: hack together fallback to vscode
Augie Fackler <raf@durin42.com>
parents:
33
diff
changeset
|
12 fi |
33
b403402153b5
Add some setup to make emacs easier to use on OS X.
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
13 else |
b403402153b5
Add some setup to make emacs easier to use on OS X.
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
14 emacs -nw "$@" |
b403402153b5
Add some setup to make emacs easier to use on OS X.
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
15 fi |