I've got a script pulled from Holman's dotfiles to allow me to sub out my editor's terminal command without having to learn the new command. In my .zshrc, I'm doing export EDITOR=choc. Then, I have this script (named e) in my bin
if test "$1" == ""
then
$($EDITOR .)
else
$($EDITOR $1)
fi
Works fine with mate and bbedit, and just running choc . or choc foo.txt works fine. But if I run e or e foo.txt, chocolat opens the correct file, or directory, but the command hangs in terminal, until I terminate it myself.
I've got a script pulled from Holman's dotfiles to allow me to sub out my editor's terminal command without having to learn the new command. In my .zshrc, I'm doing
export EDITOR=choc
. Then, I have this script (namede
) in mybin
Works fine with
mate
andbbedit
, and just runningchoc .
orchoc foo.txt
works fine. But if I rune
ore foo.txt
, chocolat opens the correct file, or directory, but the command hangs in terminal, until I terminate it myself.