Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mailcap configuration in zsh can't open .bk files
- X-seq: zsh-users 17958
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: vinurs <haiyuan.vinurs@xxxxxxxxx>
- Subject: Re: mailcap configuration in zsh can't open .bk files
- Date: Thu, 29 Aug 2013 19:59:18 -0700
- Cc: zsh-users@xxxxxxx
- 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=;
- In-reply-to: <CAA=69Zen1zin38+49gtP9WbSE3n9vE0J1FYTpPY705smKvC81Q@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: vinurs <haiyuan.vinurs@xxxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAA=69Zen1zin38+49gtP9WbSE3n9vE0J1FYTpPY705smKvC81Q@mail.gmail.com>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author