Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: mailcap configuration in zsh can't open .bk files



It's not intelligent deciding filetype by suffix only, I'd like to write
functions to open flles using 'file --mime-type'
Thanks all


2013/9/2 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>

> Bart Schaefer wrote:
> > On Aug 30,  9:29am, Peter Stephenson wrote:
> > }
> > } Hmm... the zsh-mime-setup script is smart enough to get this right if
> > } you specify pdf.bk in ~/.mime.types, e.g.
> > }
> > } application/pdf pdf pdf.bk
> > }
> > } but unfortunately the main shell isn't:  given the suffix alias pdf.bk,
> > } it only looks for the .bk suffix, so the MIME handler isn't started.
> >
> > The documentation would imply that it is therefore sufficient to put the
> > pdf.pk rule in ~/.mime.types, run zsh-mime-setup, and then add
> >
> >     alias -s bk=zsh-mime-handler
>
> That should work, too, since zsh-mime-handler doesn't care how it gets
> started, only the file name passed to it; what won't work is leaving it
> to zsh-mime-setup which will only add the alias for pdf.bk.
>
> I guess alternatively we could make it add a suffix alias for bk if
> there isn't one.
>
> pws
>


Messages sorted by: Reverse Date, Date, Thread, Author