2016-04-18 16:55:32 +00:00
|
|
|
|
[slack-link]: https://fisherman-wharf.herokuapp.com/
|
|
|
|
|
[slack-badge]: https://img.shields.io/badge/slack-join%20the%20chat-00B9FF.svg?style=flat-square
|
Ahoy my mateys! fisherman 2.0.0 (beta) is here.
A lot has changed, in fact, fisherman as you knew it, is
no longer with us. Let me explain. The new fisherman, is
in fact a rewired clone of ``fin´´, a short-lived 2 week
experiment that started because it was easier to rewrite
everything than moving fisherman forward.
Let me explain. I was longing for a lightweight, simpler
fisherman with minimal maintanance cost. This fin lad is
one of the most pragmatic pieces of code I've ever written,
but attempting to maintain two drastically different plugin
managers was not a sane decision. fin's goal was to get out
of my way and let me be productive with fish and it did.
Now fin is fisherman and fisherman is fin. The most notable
change is that fisherman no longer depends on an index, so
like fin, it's neutral and agnostic to what plugins you use.
No index means fisherman completions are no longer as clever
as to show you description of plugins, but you will still get
enough information to know whether the plugin is a theme or not.
I hope you always check the plugin's README / online docs before
installing anything anyway.
With the index gone, we had no use for ``search``, so this command
is also gone.
If you were using search often or depended on the removed features
above, I am afraid they are gone *gone*, but trust me it's all for
the very best.
Now, with this out of the way, it's all unicorns and dartfish. Almost.
To upgrade to fisherman 2.0.0 you need to REMOVE your current version
of fisherman:
1. ```rm -rf "$fisher_home" "$fisher_config"```
2. Open your config.fish and remove the fisherman initialization code.
3. ```exec fish < /dev/tty``` to reload the session.
4. Run `curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman`
That's it. Probably.
The new fisherman brings a lot more stability and maturity to the
project and we need this change in order to move forward. I will
be actively fixing any bugs that may have sneaked in during the
```fin->fisherman``` rewiring, but please do ping me:
@bucaran on GitHub or directly to my email j@bucaran.me
if you find anything out of place. Feel free and invited to go
wild with issues in order to get this into shape ASAP.
Cheers!
2016-04-21 15:34:06 +00:00
|
|
|
|
[travis-link]: https://travis-ci.org/fisherman/fisherman
|
|
|
|
|
[travis-badge]: https://img.shields.io/travis/fisherman/fisherman.svg?style=flat-square
|
2016-04-18 16:55:32 +00:00
|
|
|
|
|
2016-04-22 05:21:31 +00:00
|
|
|
|
[organization]: https://github.com/fisherman
|
|
|
|
|
[fish shell]: https://github.com/fish-shell/fish-shell
|
|
|
|
|
[fisherman]: http://fisherman.sh
|
|
|
|
|
[online]: http://fisherman.sh/#search
|
|
|
|
|
|
|
|
|
|
[English]: ../../README.md
|
|
|
|
|
[Español]: ../es-ES
|
|
|
|
|
[日本語]: ../jp-JA
|
|
|
|
|
|
Ahoy my mateys! fisherman 2.0.0 (beta) is here.
A lot has changed, in fact, fisherman as you knew it, is
no longer with us. Let me explain. The new fisherman, is
in fact a rewired clone of ``fin´´, a short-lived 2 week
experiment that started because it was easier to rewrite
everything than moving fisherman forward.
Let me explain. I was longing for a lightweight, simpler
fisherman with minimal maintanance cost. This fin lad is
one of the most pragmatic pieces of code I've ever written,
but attempting to maintain two drastically different plugin
managers was not a sane decision. fin's goal was to get out
of my way and let me be productive with fish and it did.
Now fin is fisherman and fisherman is fin. The most notable
change is that fisherman no longer depends on an index, so
like fin, it's neutral and agnostic to what plugins you use.
No index means fisherman completions are no longer as clever
as to show you description of plugins, but you will still get
enough information to know whether the plugin is a theme or not.
I hope you always check the plugin's README / online docs before
installing anything anyway.
With the index gone, we had no use for ``search``, so this command
is also gone.
If you were using search often or depended on the removed features
above, I am afraid they are gone *gone*, but trust me it's all for
the very best.
Now, with this out of the way, it's all unicorns and dartfish. Almost.
To upgrade to fisherman 2.0.0 you need to REMOVE your current version
of fisherman:
1. ```rm -rf "$fisher_home" "$fisher_config"```
2. Open your config.fish and remove the fisherman initialization code.
3. ```exec fish < /dev/tty``` to reload the session.
4. Run `curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman`
That's it. Probably.
The new fisherman brings a lot more stability and maturity to the
project and we need this change in order to move forward. I will
be actively fixing any bugs that may have sneaked in during the
```fin->fisherman``` rewiring, but please do ping me:
@bucaran on GitHub or directly to my email j@bucaran.me
if you find anything out of place. Feel free and invited to go
wild with issues in order to get this into shape ASAP.
Cheers!
2016-04-21 15:34:06 +00:00
|
|
|
|
[![Build Status][travis-badge]][travis-link]
|
|
|
|
|
[![Slack][slack-badge]][slack-link]
|
2016-04-18 16:55:32 +00:00
|
|
|
|
|
Ahoy my mateys! fisherman 2.0.0 (beta) is here.
A lot has changed, in fact, fisherman as you knew it, is
no longer with us. Let me explain. The new fisherman, is
in fact a rewired clone of ``fin´´, a short-lived 2 week
experiment that started because it was easier to rewrite
everything than moving fisherman forward.
Let me explain. I was longing for a lightweight, simpler
fisherman with minimal maintanance cost. This fin lad is
one of the most pragmatic pieces of code I've ever written,
but attempting to maintain two drastically different plugin
managers was not a sane decision. fin's goal was to get out
of my way and let me be productive with fish and it did.
Now fin is fisherman and fisherman is fin. The most notable
change is that fisherman no longer depends on an index, so
like fin, it's neutral and agnostic to what plugins you use.
No index means fisherman completions are no longer as clever
as to show you description of plugins, but you will still get
enough information to know whether the plugin is a theme or not.
I hope you always check the plugin's README / online docs before
installing anything anyway.
With the index gone, we had no use for ``search``, so this command
is also gone.
If you were using search often or depended on the removed features
above, I am afraid they are gone *gone*, but trust me it's all for
the very best.
Now, with this out of the way, it's all unicorns and dartfish. Almost.
To upgrade to fisherman 2.0.0 you need to REMOVE your current version
of fisherman:
1. ```rm -rf "$fisher_home" "$fisher_config"```
2. Open your config.fish and remove the fisherman initialization code.
3. ```exec fish < /dev/tty``` to reload the session.
4. Run `curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman`
That's it. Probably.
The new fisherman brings a lot more stability and maturity to the
project and we need this change in order to move forward. I will
be actively fixing any bugs that may have sneaked in during the
```fin->fisherman``` rewiring, but please do ping me:
@bucaran on GitHub or directly to my email j@bucaran.me
if you find anything out of place. Feel free and invited to go
wild with issues in order to get this into shape ASAP.
Cheers!
2016-04-21 15:34:06 +00:00
|
|
|
|
# [fisherman] - fish shell plugin manager
|
2016-04-18 16:55:32 +00:00
|
|
|
|
|
2016-04-21 17:16:53 +00:00
|
|
|
|
fisherman 是一款零配置,并发的 [fish shell] 插件管理器。
|
|
|
|
|
|
2016-04-21 18:06:47 +00:00
|
|
|
|
选择不同语言版本的文档: [Español], [日本語], [English]。
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
##为什么使用fisherman?
|
|
|
|
|
|
|
|
|
|
* 简单
|
|
|
|
|
|
|
|
|
|
* 零配置
|
|
|
|
|
|
|
|
|
|
* 零依赖
|
|
|
|
|
|
|
|
|
|
* 不影响 shell 启动速度
|
|
|
|
|
|
|
|
|
|
* 类似 [vundle](https://github.com/VundleVim/Vundle.vim) 的交互下载功能
|
|
|
|
|
|
|
|
|
|
* 实现了最核心的功能: 安装、更新、移除和查询插件
|
|
|
|
|
|
|
|
|
|
## 安装
|
|
|
|
|
|
|
|
|
|
拷贝 `fisher.fish` 到你的 `~/.config/fish/functions` 目录, 就这么简单。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 功能
|
|
|
|
|
|
|
|
|
|
安装插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher simple
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
从多个源安装插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher z fzf omf/{grc,thefuck}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
从 URL 安装插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher https://github.com/edc/bass
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
从 Gist 安装插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher https://gist.github.com/username/1f40e1c6e0551b2666b2
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
从本地目录安装插件。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
fisher ~/my_aliases
|
|
|
|
|
```
|
|
|
|
|
|
2016-04-23 05:34:29 +00:00
|
|
|
|
使用 [vundle](https://github.com/VundleVim/Vundle.vim) 的方式安装插件,编辑你的 fishfile 并运行 `fisher` 去安装插件。
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
2016-04-23 05:32:01 +00:00
|
|
|
|
> [什么是 fishfile 以及如何使用它?](#7-什么是-fishfile-以及如何使用它)
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$EDITOR fishfile # add plugins
|
|
|
|
|
fisher
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
查看以安装的插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher ls
|
|
|
|
|
@ my_aliases # 该插件是一个本地插件
|
|
|
|
|
* simple # 该插件是当前的命令行提示符插件
|
|
|
|
|
bass
|
|
|
|
|
fzf
|
|
|
|
|
grc
|
|
|
|
|
thefuck
|
|
|
|
|
z
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
更新所有。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher up
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
更新指定的插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher up bass z fzf thefuck
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
移除指定的插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher rm simple
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
移除所有的插件。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher ls | fisher rm
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
查看插件帮助。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisher help z
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 常见疑问解答
|
|
|
|
|
|
|
|
|
|
### 1. fish 的版本要求多少?
|
|
|
|
|
|
2016-04-23 05:32:01 +00:00
|
|
|
|
fisherman 要求 2.3.0 及以上版本的 fish。如果你不能更新你的 fish 版本,你可以写入以下[代码片段](#10-什么是一个插件)到你的 `~/.config/fish/config.fish`。
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
for file in ~/.config/fish/conf.d/*.fish
|
|
|
|
|
source $file
|
|
|
|
|
end
|
|
|
|
|
```
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 2. 如何让 fish 作为我默认的 shell ?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
Add fish to the list of login shells in `/etc/shells` and make it your default shell.
|
|
|
|
|
把 fish 加入到 `/etc/shells` 并令 fish 成为默认 shell。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
|
|
|
|
|
chsh -s /usr/local/bin/fish
|
|
|
|
|
```
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 3. 如何卸载 fisherman?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
运行以下命令。
|
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
fisher self-uninstall
|
|
|
|
|
```
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 4. fisherman 兼容已有的 fish 主题和插件吗?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
是的。
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 5. 为什么选择 fisherman?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
fisherman 有以下特色:
|
|
|
|
|
|
|
|
|
|
* 小巧,所有代码都在一个文件
|
|
|
|
|
|
|
|
|
|
* 不影响 shell 启动速度
|
|
|
|
|
|
|
|
|
|
* 容易安装、更新和卸载
|
|
|
|
|
|
|
|
|
|
* 你不再需要配置你的 fish 配置
|
|
|
|
|
|
|
|
|
|
* 符合 [XDG](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) 规范
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 6. fisherman 把数据放到哪里了?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
fisherman 的位置在 `~/.config/fish/functions/fisher.fish`。
|
|
|
|
|
缓存和插件配置被分别存在 `~/.cache/fisherman` 和 `~/.config/fisherman`。
|
|
|
|
|
fishfile 位置在 `~/.config/fish/fishfile`。
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 7. 什么是 fishfile 以及如何使用它?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
fishfile `~/.config/fish/fishfile` 列出了所有已安装的插件。
|
|
|
|
|
|
|
|
|
|
fisherman 安装插件时,会自动写入这个文件,或者你可以手动写入你想装的插件,然后运行 `fisher` 来安装插件
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
fisherman/simple
|
|
|
|
|
fisherman/z
|
|
|
|
|
omf/thefuck
|
|
|
|
|
omf/grc
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
这个文件只会记录插件和一些依赖。如果你想卸载插件,可以使用 `fisher rm`来替代。
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 8. 去哪里可以找到插件?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
看看这个 [organization] 或者使用这个 [online] 来搜索。
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 9. 如何从 ____ 更新?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
fisherman 没有引入其他任何已知的框架。如果你想卸载 oh my fish, 看它的文档即可
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 10. 什么是一个插件?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
一个插件是:
|
|
|
|
|
|
|
|
|
|
1. 一个目录或者一个在项目根目录有 `.fish` 文件或者 `functions` 目录的git仓库
|
|
|
|
|
|
|
|
|
|
2. 一个主题或者命令行提示符,比如 `fish-prompt.fish`, `fish_right_prompt.fish`。
|
|
|
|
|
|
|
|
|
|
3. 一些代码片段,比如一个或多个在 `conf.d`目录下的 `.fish` 文件并且它们会在 shell 启动时执行。
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 11. 如何把这些插件作为我自己插件的依赖?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
在项目的顶层目录创建一个新的 `fishfile` 文件,并写下你的依赖。
|
|
|
|
|
|
|
|
|
|
```fish
|
|
|
|
|
owner/repo
|
|
|
|
|
https://github.com/dude/sweet
|
|
|
|
|
https://gist.github.com/bucaran/c256586044fea832e62f02bc6f6daf32
|
|
|
|
|
```
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 12. 什么是 fundle?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
fundle 启发我去使用打包的文件,但是目前它仍然有着一些功能限制,需要你去调整 fish 配置。
|
|
|
|
|
|
2016-04-23 05:23:30 +00:00
|
|
|
|
### 13. 我有一些问题想提交?
|
2016-04-21 17:16:53 +00:00
|
|
|
|
|
|
|
|
|
在 gituhb issue 上创建一个新的工单:
|
|
|
|
|
|
|
|
|
|
* https://github.com/fisherman/fisherman/issues
|