S
S
SEACRE5T2021-04-22 16:48:04
git
SEACRE5T, 2021-04-22 16:48:04

How to force git to use emacs editor in terminal?

git can open emacs with the -nw flag by default? "git config --global core.editor emacs -nw" doesn't do anything and looks like nonsense

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2021-04-22
@SEACRE5T


When you run git config --global core.editor emacs -nw, your shell splits the command line into words before invoking git. Git thus sees "emacs -nw" as two separate arguments. It only needs one to put into the config file, so the other is ignored. (Actually, that's a lie but you can check the man page for details.) You can put quotes around a series of words to tell your shell not to break them up: git config --global core.editor "emacs -nw" will give "emacs -nw" to git as a single argument which will do what you want.

https://emacs.stackexchange.com/questions/21276/ho...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question