On Tue, 29 Dec 1998, Peter S Galbraith wrote:
> > I'd like metamail to offer me _all_ of the possible display > machanisms until I say yes to one of them: > > In my ~/.mailcap I have: > > application/msword; /opt/WordPerfect8/wpbin/xwp %s > application/msword; /opt/StarOffice-5.0/bin/soffice %s > application/msword; word2txt %s > > When I view it with metamail (or mhn which calls metamail), it > prompts me like so: > > This message contains 'application/msword'-format data. > Do you want to view it using the 'xwp' command (y/n) [y] ? > > Only the first entry is prompted-for. It would be nice if it > prompted for `soffice' if I said no to `xwp' and so on. > > It this possible? I couldn't find anything in the metamail or > mailcap man pages, but maybe I missed it. If is not possible by specifying a mechanism in your mailcap, it would be possible by specifying a shell script as the action to take in your mailcap. You would answer "yes" and then the script would ask you what you wanted to do. In the script the possible actions could be asked in a sequence as you suggest or the question: Do you want a or b or c ... ? in a loop. You could also use a c program instead of a script using argc/argv and system,spawm,exec type function , but for something this small a sh script would be fine. The action in the script would need the argument to the script - so you would use something like "xwp $* ". Now all you have to do is write the sh script. > -- > Peter Galbraith, research scientist <[EMAIL PROTECTED]> > Maurice Lamontagne Institute, Department of Fisheries and Oceans Canada > P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada. 418-775-0852 FAX: 775-0546 > 6623'rd GNU/Linux user at the Counter - http://counter.li.org/ > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > >