From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8291 invoked by alias); 30 Aug 2013 03:16:47 -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: 17958 Received: (qmail 9874 invoked from network); 30 Aug 2013 03:16:34 -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=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at spodhuis.org does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201210; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=LZi1HgWg3dManupXnk4ab3WLt5HZz9s92AkexB26y3s=; b=wvuPhv+E5NHyFOwbgmVQGF4nJxRBcN+H4vGnOnhvsY+NE95pt8G6XWgNqxljl47bCDf0/KVo3MxaYmKlDssbzaEgeW+OMTarV012jkpYWUEvZJhFUbzY9jeZk3rFE/Kf6NwwiOxUHEMCGocVT7g+0G15gWdy89woHk2i48M+E8Q=; Date: Thu, 29 Aug 2013 19:59:18 -0700 From: Phil Pennock To: vinurs Cc: zsh-users@zsh.org Subject: Re: mailcap configuration in zsh can't open .bk files Message-ID: <20130830025918.GA35749@redoubt.spodhuis.org> Mail-Followup-To: vinurs , zsh-users@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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