On Mon, Aug 14, 2000 at 06:14:31PM +0200, Caster wrote:
> Why something like this doesn't work:
>
> set editor=`if test $DISPLAY ; then echo gvim -c ":normal 2/^$/"
> +nohlsearch %s ; else echo vim -c ":normal 2/^$/" +nohlsearch %s ; fi`
>
> It's all in one line. Mutt complains about unknown -c option (!). I've
> tried to quote it and escape it somehow but it just doesn't work.
the backticks (``) are evaluated at the time the .muttrc is read. so mutt
is running the script when it first starts up, replacing the `` with the
output of the shell program. it looks like what it is seeing is:
set editor=gvim -c ":normal 2/^$/" +nohlsearch %s
which is not correct syntax because you can't have spaces in the value of a
variable without quoting it. It sets $editor to gvim and then tries to set
the variable -c, which of course does not exist.
me
PGP signature