From: Johannes Schindelin Date: Thu, 19 Jul 2007 18:46:50 GMT Subject: Re: [PATCH] Add git-sh-setup::set_editor() Message-ID: In-Reply-To: <11848694482569-git-send-email-aroben@apple.com> Hi, On Thu, 19 Jul 2007, Adam Roben wrote: > This function can be used to set the GIT_EDITOR variable to the user's > preferred editor. Much nicer, thank you. However, > - commit_editor=$(git config core.editor || echo ${VISUAL:-$EDITOR}) > - case "$commit_editor,$TERM" in > + case "$GIT_EDITOR,$TERM" in > ,dumb) This can no longer happen, since ... > +set_editor() { > + GIT_EDITOR=$(git config core.editor || echo ${VISUAL:-${EDITOR:-vi}}) > + export GIT_EDITOR > +} ... "vi" is the last resort, not "", right? So I guess you just want to drag that test and warning into git-sh-setup (where I think it has a better home anyway). Ciao, Dscho