With experiments, I conclude the following are right format/instances: text/html; mozilla -remote openurl\\(file:%s\\)
text/html; mozilla -remote openfile\\(%s\\) text/html; mozilla %s (this should also work if run in shell w/o problem) thanks for your help, charlie On Wed, Dec 26, 2001 at 01:30:47AM -0500, Philip Mak wrote: > On Wed, 26 Dec 2001, Charles Jie wrote: > > > In my .mailcap: > > > > text/html; mozilla -remote openurl\(file:%s\) > > > > always fails because %s is expanded as '....' > > > > The quotes are the problem because they mix up in the URL. > > How about this? > > text/html; mozilla -remote openurl\(file:`echo %s | sed "s/^'\(.*\)'$/\1/"`\) > > sed "s/^'\(.*\)'$/\1/" will read 'something' from standard input and write > it to standard output without the single quotes.