Hi Graham,

The custom tool really only takes a command, not a shell expression. So in
your example "echo %t  | sqlformatter.exe" the "|" doesn't do what you
think it does - instead it is just passed on as a literal to the "echo"
command.

What you should do is put the commands in a ".bat" file, then use that
".bat" file as a custom command.

I would advice to go the "%f" route and use a custom script to extract the
sql and run it through the formatter. The "%t" might not work at all in
combination with the code blocks plugin - at least, I have not tested that.

Hope this helps,

Jaap



On Thu, Apr 30, 2015 at 1:38 PM, Graham Foster <gandalfmeis...@gmail.com>
wrote:

> Hi
>
> I do a lot of SQL and use Zim for keeping notes on client issues / the SQL
> used to investigate issues.
>
> I have the source code plugin, which does nice highlighting, but I would
> like to do reformatting too.
>
> I have a command line reformatter, but it expects SQL text in – not wiki
> format text. I tried passing selected text, but that doesn’t work.
>
> I can make it work like a filter for simple SQL, but although I use %t as
> parameter – it still doesn’t work.
>
>
>
> echo %t  | sqlformatter.exe  - fails command notfound??
>
> sqlformatter.exe %f  - fails – chokes on the wiki text
>
>
>
> Any suggestions as to how to get this to work please?
>
> Graham
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zim-wiki
> Post to     : zim-wiki@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~zim-wiki
> More help   : https://help.launchpad.net/ListHelp
>
>
_______________________________________________
Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp

Reply via email to