Mercurial > dotfiles
annotate unixSoft/otherbin/emacs.sh @ 524:24f7a481d284
shell: cache openssl prefix from homebrew
Turns out homebrew costs about 800ms to figure this out, experimentally. :(
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 14 Nov 2022 10:40:29 -0500 |
parents | 7983184eb8d8 |
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 |