[Users] redundant attachments in mimetmp

Jean-D. Ackle jdalinux at yahoo.com.br
Mon Dec 19 19:19:11 CET 2011

I can only reply to the first part of your message (which isn't actually your message's subject but it's all I know how to answer.

> When i do 'open with' on an image
> attachment if offers me xyz '%s' where xyz is the default
> viewer. 
> Do i really need the '%s' in the first place ? I can not
> imagine any scenario where you would not want the filename
> as argument...?

You don't need the '%s' to do just that one particular action but the thing is Claws enables you to do at least two more things with that syntax:
1. Execute a program where the filename argument is not simply the last one in the command-line. E.g. suppose you wanted to move it to some location; the command would be:
   mv %s someplace
This was a very simple example; some programs enable a really complex set of arguments you may actually need or want to use.
2. This second case is just actually an expansion of the first one: running multiple commands on the file. An example could be:
   clamscan --bell %s && geeqie %s && rm mimetmp/*
On Bash, the '&&' operator tells Bash to run clamscan --bell (scan for viruses) and then open the file with geeqie and then remove all files from the mimetmp folder (you would actually need to input the path to the mimetmp folder for it to work...).
As you can see, you can perform several more or less complex actions / commands on the attachment and that's why the '%s' is useful. And if you only need one simple action on the file, then you just append the '%s' to it. Flexibility is the keyword here. ;-)

More information about the Users mailing list