From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14195 invoked by alias); 2 Sep 2013 01:28:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17963 Received: (qmail 4457 invoked from network); 2 Sep 2013 01:28:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HK_RANDOM_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.212.53 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GDOntkYkppb0Zg9ESNMWM8uV6Wpppxezejgu5uiH1Qk=; b=JztSTu/KNo02UgvtqZGLNVMz9h79Hzqj2OmL0CnKoR+7xuhWTIFsFuTSJS0xYo1HRj Wkm0ZFKZwf825GS63abU0Hpg8dnQKV0W0xC/qD72upZ96Rz8aZqe+D6trEnRKFncG44t zotaKmbegMcN+auvEx7SxDpq19G7+om3F5mJV/uNj0OanqYQDyuJSjeH2cjt3/mDSQIr xTv4DmYrxCAVMP5GQBzka0w5iEAKgUStqM+0bEj9tRZPwoxuclhMTh29zHvDTvs+hWdV BHEH/NawD/+UZYXI2oc+F1STrE9k9xvHjcg2M3Qv708GDOtVydIqsyFIf8uqc4jFfH3A jbWw== MIME-Version: 1.0 X-Received: by 10.52.187.65 with SMTP id fq1mr16545386vdc.13.1378085306154; Sun, 01 Sep 2013 18:28:26 -0700 (PDT) In-Reply-To: <201309011711.r81HBEEF002418@pws-pc.ntlworld.com> References: <130830101018.ZM26161@torch.brasslantern.com> <201309011711.r81HBEEF002418@pws-pc.ntlworld.com> Date: Mon, 2 Sep 2013 09:28:26 +0800 Message-ID: Subject: Re: mailcap configuration in zsh can't open .bk files From: vinurs To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=bcaec548a44324c5f204e55c7dde --bcaec548a44324c5f204e55c7dde Content-Type: text/plain; charset=UTF-8 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 > 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 > --bcaec548a44324c5f204e55c7dde--