On Sun, 31 Aug 2008, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> On Sat, 30 Aug 2008, Hans Hagen wrote:
>> 
>>> Aditya Mahajan wrote:
>>>> texmfstart does not handle = in --argument propertly. For example
>>>> 
>>>> texmfstart --verbose --arguments="a=b" bin:echo
>>> 
>>> and what does
>> 
>> Both give incorrect output
>> 
>>> texmfstart --verbose "--arguments=a=b" bin:echo
>> 
>> texmfstart --verbose "--arguments=a=b" bin:echo
>
> the first argument of texmfstart is considered to be the called script, prog 
> etc
>
> texmfstart [optional args for texmfstart] [prog to call] [args to prog]
>
> so the question is, what do you want to achieve
>
>> texmfstart --verbose bin:echo "--args=a=b"
> texmfstart version 2.0.3
> using 'system' call: echo  --args=a=b
> --args=a=b

I want to call vim with the following arguments (all in one line)

vim -u NONE -e -C -n -c "set tabstop=8" -c "source 
/home/adityam/tex/texmf-local/tex/context/third/vim/2context.vim"
-c "wqa" test-vimsyntax.tmp

So, I use the following command: (in one line)

texmfstart --verbose bin:vim "-u NONE -e -C -n  -c \"set 
tabstop=8\" -c \"source kpse:2context.vim \" -c \"wqa\" test-vimsyntax.tmp "

which gives

texmfstart version 2.0.3
kpse     : direct (forced)
locating '2context.vim' in program space 'context'
2context.vim is resolved to 
/home/adityam/tex/texmf-local/tex/context/third/vim/2context.vim
using 'system' call: vim  -u NONE -e -C -n -c "set tabstop="8" -c 
"source /home/adityam/tex/texmf-local/tex/context/third/vim/2context.vim " 
-c "wqa" test-vimsyntax.tmp "

Notice that texmfstart has mungled the quotes. There are quotes around 8, 
and an extra quote in the end. The man page of texmfstart says

  --arguments=str
               an  alternative  for  providing  the arguments to be passed.  For
               example,
                  texmfstart --arguments=b.tex texexec
               will pass b.tex as the argument to texexec.

So, I was trying to use --arguments to see if that works better than the 
default. But --arguments fails does worse (again on one line)

texmfstart --verbose --arguments="-u NONE -e -C -n -c \"set 
tabstop=8\" -c \"source kpse:2context.vim \" -c \"wqa\" test-vimsyntax.tmp "
bin:vim

texmfstart version 2.0.3
using 'system' call: vim -u NONE -e -C -n -V10log -c "set tabstop
sh: Syntax error: Unterminated quoted string


So, how do I use texmfstart to get what I need? I cannot call vim directly 
because I want to use kpse to search for the exact path of 2context.vim 
file.

Aditya
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to