* Cameron Simpson <c...@zip.com.au> [111030 13:12]: <..> > For images etc I have a more complex script: > > http://www.cskk.ezoshosting.com/cs/css/bin/apphelper Got it.
> which offers to view the attachment and also to save it, since I find > the "open viewer, quit, ask to save" rigmarole tedious. > > It has a million switches (which you can put in $APPHELPER_PREOPTS to > set default behaviour). Manual page here: > > http://www.cskk.ezoshosting.com/cs/css/manuals/apphelper.1.html Looking at it. > Since apphelper finds the file viewer by consulting the mailcap file > I in fact keep two such files around: a plain mailcap and a mailcap-ah > which has lines like: > > image/jpg; ah %s xv; gui > image/jpg; iminfo %s; copiousoutput > > which I use with mutt. > > As you can see I run apphelper via a small wrapper script "ah", which I > attach below. It runs apphelper with the autoview mode on and has some > conveniences, such as using the output of `xclip -o` if no filename is > specified so I can X11-copy a URL and then run ah. Got a lot of issues with ah->apphelper. But first I have to say 1)I am new to darwin (OSX/Lion) 2)Even tho' I have used linux steadily for 11 years and am a coder, I'm awful green when it comes to shell scripting. 3)The paths defined by $PATH in the bash shell are considerably more complete than are inherited by mutt - and the same can be said of mc, as far as I can tell. From bash - linus:~ tim$ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin From mutt echo $PATH /usr/bin:/bin:/usr/sbin:/sbin that is, where mutt is launched from iTerm2. So when I run /usr/local/bin/ah, the first thing I get is an error message about `rm' not being recognized. Well it ain't in $PATH, so I can give rm an absolute path. With that done and apphelper give its' full path, I'm now getting error messages with apphelper execute: the first was on mkdirn - command not recognized. I went thru your code and picked out a list of what I take to be commands, but don't appear to be shell commands (subcommands?). As follows: mkdirn withurl fixexts file2mime mailcap readline so... I'm guessing that if we solve the problem with mkdirn, others will fall in place? -- Tim tim at tee jay forty nine dot com or akwebsoft dot com http://www.akwebsoft.com