> Dr Beco wrote:
> >
> > $vi +"r ! find . -name 'error*' -printf '%f\n'" themain.c
> >
> Bob wrote:
> The problem you are hitting is that vim is expanding the % itself and
> isn't passing it to bash nor on to find.  It isn't related to quoting.
> It is related to vi's percent expansion.  Use something other than
> percent to avoid the problem.  In vi the '%' is replaced by the
> current filename.  That is traditional vi behavior.
> For 'find' you can use the default -print case by not specifying anything.
>   vim +"r ! find . -name 'error*'" themain.c
> Bob

Hi Bob,

Thanks! You clarified a trick problem. After what you said, I tried:

vim +"r ! find . -name 'error*' -printf '\%f\n'" themain.c

And voilá! It worked! Just scape the % and you can use it, as vi
passes to find the correct char %.

Thanks!
Beco


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caluyw2zc_lwdbvjq1nnuqclpn89+zso_kjzh5u6cr1j3xet...@mail.gmail.com

Reply via email to