From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11332 invoked by alias); 30 Aug 2013 03:27:54 -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: 17959 Received: (qmail 698 invoked from network); 30 Aug 2013 03:27:41 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.212.48 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:from:date:message-id:subject:to :content-type; bh=l7A4jbwdhad86yFc+d9wwBXHOmSauDGDdPgaXYkruOg=; b=HVZTI+N07vjlrlKRpiZJXoDRGL/nUt1IREiYBEYcd+Gdx2vS3V4Xr2Pcny3k2KlS35 vs/KcxZLRMK7x5EaqKhebv/0re93Uj999F4ZQxeNIwNmDho6SGfJK1RC2AvOC3kCisl+ 5a/ly/oojo1DhFx76PtlZ2H+lKkiKSFLbzGkDgqvxkP2VQu1/lCSRgmKRl0PoNg5/md9 y3YAPVVBa/LzTSvhXnIveN8NJ4al42I32jNPWxgd7XonFBUs7ThB0xOBwVTDcWqdNURc GZBBo7W+ThrnMhjEy29BFqWCqaJ3/HFJ3Lshp3uJsN7cxlE3gYAVdu91BDJoYMANZMNK 3Lmw== X-Received: by 10.52.36.204 with SMTP id s12mr155141vdj.36.1377833253970; Thu, 29 Aug 2013 20:27:33 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130830025918.GA35749@redoubt.spodhuis.org> References: <20130830025918.GA35749@redoubt.spodhuis.org> From: shawn wilson Date: Thu, 29 Aug 2013 23:27:13 -0400 Message-ID: Subject: Re: mailcap configuration in zsh can't open .bk files To: vinurs , Zsh Users Content-Type: multipart/alternative; boundary=20cf307c9ddca9b38804e521cda0 --20cf307c9ddca9b38804e521cda0 Content-Type: text/plain; charset=UTF-8 Magic isn't 100% anyway. It's best to use extensions unless you're doing forensics. On Thu, Aug 29, 2013 at 10:59 PM, Phil Pennock < zsh-workers+phil.pennock@spodhuis.org> wrote: > On 2013-08-30 at 09:12 +0800, vinurs wrote: > > then in zsh, I can open pdf files, but ,when I mv test.pdf to > test.pdf.bk, > > It can not be opened. > > I use file --mime-type test.pdf.bk, It shows: > > test.pdf.bk: application/pdf > > The `file` command looks inside the content of a file and uses a complex > set of rules to try to figure out what sort of file it is. > > The normal approach of MIME handling on Unix is to use the filename > extension to figure out the type of file. There are *two* files of > interest: `mailcap` files say what to do with a MIME type, `mime.types` > files say what MIME type should be assumed for a given extension. > > The pathnames to these files and other information can be found in the > zshcontrib(1) manual-page: > > % man zshcontrib > > and search for "MIME FUNCTIONS". > > -Phil > --20cf307c9ddca9b38804e521cda0--