Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

thunderbird -compose "attachment='$HOME/test test.txt'" works. thunderbird -compose "attachment='$HOME/test, test.txt'" does not work and gives a file does not exist error message.

This must be because of the way Thunderbird handles command line arguments; e.g.,

thunderbird -compose "to='name@mail.com',attachment='~/file.txt'"

The compose arguments are separated by , and that must be why having a , in the file name breaks things. I cannot, however, think of a way to "escape" commas in the file name.

Note:

  • In Thunderbird 3+, using the protocol file:// is not required any more.

Both

thunderbird -compose "attachment='$HOME/test test.txt'"

and

thunderbird -compose "attachment='file://$HOME/test test.txt'"

work.

Neither

thunderbird -compose "attachment='$HOME/test, test.txt'"

nor

thunderbird -compose "attachment='file://$HOME/test, test.txt'"

works.

share|improve this question
1  
At a guess I would suggest trying to escape \, or url encode %2C it. –  Etan Reisner Jul 31 '13 at 1:24
    
Escaping comma (\,) does not work; it gives the same file does not exist error. The characters , and % are both legitimate in the file name so I don't think URL encoding is an option because test,test and test%2Ctest are both legitimate file names. –  Omid Jul 31 '13 at 1:41
2  
While true test%2Ctest would become test%252Ctest when url encoded. It is worth trying it (it might need the explicit file:// prefix to work I suppose but I don't know). –  Etan Reisner Jul 31 '13 at 1:45
    
Sounds like a bug in the wrapper script. –  Ignacio Vazquez-Abrams Jul 31 '13 at 3:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.