On Tue, Aug 28, 2007 at 05:24:19PM +0200, Petr Baudis <pasky@xxxxxxx> wrote: > On Tue, Aug 28, 2007 at 05:03:54PM CEST, Mike Hommey wrote: > > On Tue, Aug 28, 2007 at 04:58:04PM +0200, Petr Baudis <pasky@xxxxxxx> wrote: > > > On Tue, Aug 28, 2007 at 04:52:58PM CEST, Mike Hommey wrote: > > > > On Tue, Aug 28, 2007 at 09:12:07AM -0500, Bill Lear <rael@xxxxxxxxxx> wrote: > > > > > My co-worker is visually impaired, and he uses a custom emacs. His > > > > > EDITOR is set to something like "~/bin/xemacs -nw". When git-commit > > > > > runs, it complains: > > > > > > > > > > % git-commit > > > > > git-commit: line 582: ~/bin/xemacs -nw: No such file or directory > > > > > > > > > > So, I fiddled with the following line in git-commit: > > > > > > > > > > ${VISUAL:-${EDITOR:-vi}} "$GIT_DIR/COMMIT_EDITMSG" > > > > > > > > I don't see how this line could trigger an error like the one you get. > > > > > > > > Your error message doesn't tell you it doesn't expand the tilde, it tells > > > > you it uses the whole string ! It is looking for a "xemacs -nw" file under > > > > $HOME/bin, which obviously doesn't exist. > > > > > > > > Now, theorically, this should not happen unless you quote the whole > > > > variable substitution thing. > > > > > > $ (x='a b'; $x) > > > bash: a: command not found > > > $ (x='~/a b'; $x) > > > bash: ~/a: No such file or directory > > > > Your point being ? > > That your point is wrong. Shell will perform word splitting after > variable expansion. But it will perform variable expansion after tilde > expansion, and that's the trouble. That's exactly what I said. It should only happen if ${VISUAL:-${EDITOR:-vi}} was quoted. And yet, look at his error message. Mike - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html