keep sync with master README.md (#198)

Sync with English README.md
This commit is contained in:
detailyang 2016-04-19 00:55:32 +08:00 committed by Jorge Bucaran
parent c4e3c710f4
commit 07e163614d

View file

@ -4,257 +4,251 @@
</p> </p>
<a name="fisherman"></a> <a name="fisherman"></a>
[![play]][play-link] [![play]][play-link]
<h4 align="center"> <h4 align="center">
<br> <br>
<br> <br>
<a href="http://fisherman.sh"><img <a href="http://fisherman.sh"><img
alt="Fisherman" alt="fisherman"
width=800px width=800px
src="https://rawgit.com/fisherman/logo/master/fisherman-black-white.svg"></a> src="https://rawgit.com/fisherman/logo/master/fisherman-black-white.svg"></a>
<br> <br>
<br> <br>
<br> <br>
</h4> </h4>
[![Build Status][travis-badge]][travis-link] [![Build Status][travis-badge]][travis-link]
[![Fisherman Version][version-badge]][version-link] [![fisherman Version][version-badge]][version-link]
[![Slack Room][slack-badge]][slack-link] [![Slack Room][slack-badge]][slack-link]
## 安装 ## 安装
```fish ```fish
curl -sL get.fisherman.sh | fish curl -sL get.fisherman.sh | fish
``` ```
## 使用 ## 使用
安装 [fishery][fishery] 插件。 安装 [fishery][fishery] 插件。
``` ```
fisher i fishtape shark get bobthefish fisher i fishtape shark get bobthefish
``` ```
安装 [Oh My Fish][Oh My Fish] 插件。 安装 [Oh My Fish][Oh My Fish] 插件。
```fish ```fish
fisher i omf/plugin-{percol,jump,fasd} fisher i omf/plugin-{percol,jump,fasd}
``` ```
安装本地插件。 安装本地插件。
```fish ```fish
fisher i ./path/to/plugin fisher i ./path/to/plugin
``` ```
从不同的 URL 安装插件。 从不同的 URL 安装插件。
```fish ```fish
fisher i https://github.com/some/plugin another/plugin bb:one/more fisher i https://github.com/some/plugin another/plugin bb:one/more
``` ```
从 [Gist][Gist] 安装插件。 从 [Gist][Gist] 安装插件。
```fish ```fish
fisher i gist.github.com/owner/1f40e1c6e0551b2666b2 fisher i gist.github.com/owner/1f40e1c6e0551b2666b2
``` ```
更新所有的插件。 更新所有的插件。
``` ```
fisher u fisher u
``` ```
更新指定的插件。 更新指定的插件。
``` ```
fisher u shark get fisher u shark get
``` ```
卸载指定的插件。 卸载指定的插件。
``` ```
fisher uninstall fishtape debug fisher uninstall fishtape debug
``` ```
## 显示和搜索 ## 显示和搜索
`fisher list` 命令会显示本地安装的插件。`fisher search` 命令会通过本地索引去查找合适的插件。 `fisher list` 命令会显示本地安装的插件。`fisher search` 命令会通过本地索引去查找合适的插件。
``` ```
fisher list fisher list
debug debug
fishtape fishtape
spin spin
> superman > superman
@ wipe @ wipe
``` ```
查找插件。 查找插件。
``` ```
fisher search fisher search
... ...
* debug Conditional debug logger * debug Conditional debug logger
errno POSIX error code/string translator errno POSIX error code/string translator
* fishtape TAP producing test runner * fishtape TAP producing test runner
flash Flash-inspired, thunder prompt flash Flash-inspired, thunder prompt
fzf Efficient keybindings for fzf fzf Efficient keybindings for fzf
get Press any key to continue get Press any key to continue
... ...
> superman Powerline prompt based on Superman > superman Powerline prompt based on Superman
... ...
``` ```
使用正则表达式查找插件。 使用正则表达式查找插件。
``` ```
fisher search --name~/git-is/ fisher search --name~/git-is/
git-is-dirty Test if there are changes not staged for commit git-is-dirty Test if there are changes not staged for commit
git-is-empty Test if a repository is empty git-is-empty Test if a repository is empty
git-is-repo Test if the current directory is a Git repo git-is-repo Test if the current directory is a Git repo
git-is-staged Test if there are changes staged for commit git-is-staged Test if there are changes staged for commit
git-is-stashed Test if there are changes in the stash git-is-stashed Test if there are changes in the stash
git-is-touched Test if there are changes in the working tree git-is-touched Test if there are changes in the working tree
``` ```
使用标签查找插件。 使用标签查找插件。
``` ```
fisher search --tag={git,test} fisher search --tag={git,test}
... ...
* fishtape TAP producing test runner * fishtape TAP producing test runner
git-branch-name Get the name of the current Git branch git-branch-name Get the name of the current Git branch
git-is-dirty Test if there are changes not staged for commit git-is-dirty Test if there are changes not staged for commit
git-is-empty Test if a repository is empty git-is-empty Test if a repository is empty
git-is-repo Test if the current directory is a Git repo git-is-repo Test if the current directory is a Git repo
git-is-staged Test if there are changes staged for commit git-is-staged Test if there are changes staged for commit
git-is-stashed Test if there are changes in the stash git-is-stashed Test if there are changes in the stash
git-is-touched Test if there are changes in the working tree git-is-touched Test if there are changes in the working tree
... ...
``` ```
最前面的符号有以下几种含义: 最前面的符号有以下几种含义:
* `>` 该插件是用于修改提示符 * `>` 该插件是用于修改提示符
* `*` 该插件已安装 * `*` 该插件已安装
* `@` 该插件是一个本地软链接 * `@` 该插件是一个本地软链接
## 管道 ## 管道
Fisherman 的命令全部支持管道。可以通过管道来连接其他命令,从而实现更复杂的功能。 fisherman 的命令全部支持管道。可以通过管道来连接其他命令,从而实现更复杂的功能。
更新所有为软链接的插件。 更新所有为软链接的插件。
```fish ```fish
fisher list --link | fisher update - fisher list --link | fisher update -
``` ```
重新启用被禁用的插件。 重新启用被禁用的插件。
```fish ```fish
fisher list --disabled | fisher install fisher list --disabled | fisher install
``` ```
卸载所有的插件,并从缓存中删除。 卸载所有的插件,并从缓存中删除。
```fish ```fish
fisher list | fisher uninstall --force fisher list | fisher uninstall --force
``` ```
## Dotfiles ## Bundle
当你安装插件时Fisherman 会更新到 *fishfile* 以便之后跟踪启用了哪些插件。 当你安装一个插件时fisherman 会更新到 *bundle* 文件以便之后跟踪激活了哪些插件。
* 自定义 *fishfile* 的位置。 * 自定义 bundle 的位置。
```fish ```fish
set -g fisher_file ~/.dotfiles/fishfile set -g fisher_file ~/.dotfiles/bundle
``` ```
## 扁平的目录结构 ## 扁平的目录结构
Fisherman 会合并所有插件的目录到一个扁平的目录结构。之所以这样做的原因是因为无论安装了多少插件,只用在 shell 启动时加载一次,Fisherman 就能拥有不错的性能。 fisherman 会合并所有插件的目录到一个扁平的目录结构。之所以这样做的原因是因为无论安装了多少插件,只用在 shell 启动时加载一次,fisherman 就能拥有不错的性能。
以下图例展现了一个插件在 Fiserhman 中的目录结构。 以下图例展现了一个插件在 Fiserhman 中的目录结构。
``` ```
$fisher_config $fisher_config
├── cache ├── cache
├── completions ├── completions
│   └── my_plugin.fish │   └── my_plugin.fish
├── conf.d ├── conf.d
│   └── my_plugin.fish │   └── my_plugin.fish
├── fishfile ├── bundle
├── functions ├── functions
│   ├── fish_prompt.fish │   ├── fish_prompt.fish
│   ├── fish_right_prompt.fish │   ├── fish_right_prompt.fish
│   └── my_plugin.fish │   └── my_plugin.fish
└── man └── man
└── man1 └── man1
└── my_plugin.1 └── my_plugin.1
``` ```
## 索引 ## 索引
索引就是一个用来记录被 Fisherman 安装的插件的文本数据库。 索引就是一个用来记录被 fisherman 安装的插件的文本数据库。
索引记录了每个插件的*名字* *地址* *信息**标签*以及*作者*。 索引记录了每个插件的*名字* *地址* *信息**标签*以及*作者*。
``` ```
z z
https://github.com/fishery/z https://github.com/fishery/z
Pure-fish z directory jumping Pure-fish z directory jumping
z search cd jump z search cd jump
jethrokuan jethrokuan
``` ```
如果你想要提交插件, 你可以向这个 [仓库](https://github.com/fisherman/index) 发起一个 PR 如果你想要提交插件, 你可以向这个 [仓库](https://github.com/fisherman/index) 发起一个 PR
``` ```
git clone https://github.com/fisherman/index git clone https://github.com/fisherman/index
cd index cd index
echo "$name\n$url\n$info\n$tags\n$author\n\n" >> index echo "$name\n$url\n$info\n$tags\n$author\n\n" >> index
git push origin master git push origin master
``` ```
## 变量
* $fisher_home:
Fisherman 的家目录。如果你按照推荐的方式安装了 Fisherman这个变量应该是 *XDG_DATA_HOME/fisherman*
* $fisher_config: ## 变量
Fisherman 的配置目录。这个目录默认应该是你的 *fishfile*, *key_bindings.fish*, *cache*, *functions*, *completions* and *conf.d* 等目录所在的位置。它的默认值是 *XDG_CONFIG_HOME/fisherman*
* $fisher_file: * $fisher_home:
具体查看 [fishfile](#dotfiles) fisherman 的家目录。如果你按照推荐的方式安装了 fisherman这个变量应该是 *XDG_DATA_HOME/fisherman*
* $fisher_cache: * $fisher_config:
Fisherman 的缓存目录。 所有的插件都会被下载到这个位置 fisherman 的配置目录。这个目录默认应该是你的 *fishfile*, *key_bindings.fish*, *cache*, *functions*, *completions* and *conf.d* 等目录所在的位置。它的默认值是 *XDG_CONFIG_HOME/fisherman*
* $fisher_alias *command*=*alias* ...: * $fisher_file:
可以使用这个变量去创建 Fisherman 的命令别名。 bundle 文件的位置
[travis-link]: https://travis-ci.org/fisherman/fisherman * $fisher_cache:
[travis-badge]: https://img.shields.io/travis/fisherman/fisherman.svg?style=flat-square fisherman 的缓存目录。 所有的插件都会被下载到这个位置。
[version-badge]: https://img.shields.io/badge/latest-v1.4.0-00B9FF.svg?style=flat-square * $fisher_alias *command*=*alias* ...:
[version-link]: https://github.com/fisherman/fisherman/releases 可以使用这个变量去创建 fisherman 的命令别名。
[slack-link]: https://fisherman-wharf.herokuapp.com/ [travis-link]: https://travis-ci.org/fisherman/fisherman
[slack-badge]: https://img.shields.io/badge/slack-join%20the%20chat-00B9FF.svg?style=flat-square [travis-badge]: https://img.shields.io/travis/fisherman/fisherman.svg?style=flat-square
[play]: https://cloud.githubusercontent.com/assets/8317250/14401577/14411b12-fe51-11e5-8d5a-bb054edfc2d4.png [version-badge]: https://img.shields.io/badge/latest-v1.4.0-00B9FF.svg?style=flat-square
[play-link]: http://fisherman.sh/#demo [version-link]: https://github.com/fisherman/fisherman/releases
[Get Started]: https://github.com/fisherman/fisherman/wiki [slack-link]: https://fisherman-wharf.herokuapp.com/
[Plugins]: http://fisherman.sh/#search [slack-badge]: https://img.shields.io/badge/slack-join%20the%20chat-00B9FF.svg?style=flat-square
[fish]: https://github.com/fish-shell/fish-shell
[play]: https://cloud.githubusercontent.com/assets/8317250/14401577/14411b12-fe51-11e5-8d5a-bb054edfc2d4.png
[other]: https://github.com/fisherman/fisherman/wiki/Installing-Fisherman#notes [play-link]: http://fisherman.sh/#demo
[Fisherman]: http://fisherman.sh
[new]: https://github.com/fishery/new [Plugins]: http://fisherman.sh/#search
[fish]: https://github.com/fish-shell/fish-shell
[fishery]: https://github.com/fishery
[Oh My Fish]: https://github.com/oh-my-fish [other]: https://github.com/fisherman/fisherman/wiki/Installing-fisherman#notes
[Gist]: https://gist.github.com/ [fisherman]: http://fisherman.sh