-
-
Save sevki/7270263 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
# | |
# Quick shortcut to an editor. | |
# | |
# This means that as I travel back and forth between editors, hey, I don't have | |
# to re-learn any arcane commands. Neat. | |
# | |
# USAGE: | |
# | |
# $ e | |
# # => opens the current directory in your editor | |
# | |
# $ e . | |
# $ e /usr/local | |
# # => opens the specified directory in your editor | |
if test "$1" == "" | |
then | |
exec $EDITOR . | |
else | |
# BECAUSE FUCK | |
case $1 in | |
*_EDITMSG ) | |
/usr/local/bin/emacsclient -t $1 | |
;; | |
*MERGE_MSG ) | |
/usr/local/bin/emacsclient -t $1 | |
;; | |
*_TAGMSG ) | |
/usr/local/bin/emacsclient -t $1 | |
;; | |
* ) | |
$EDITOR $1 | |
;; | |
esac | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment