mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Add love to the docs
This commit is contained in:
parent
aa4e1caca5
commit
7a47e294b9
1 changed files with 16 additions and 16 deletions
32
README.md
32
README.md
|
@ -5,7 +5,7 @@
|
||||||
Manage functions, completions, bindings, and snippets from the command line. Extend your shell capabilities, change the look of your prompt and create repeatable configurations across different systems effortlessly.
|
Manage functions, completions, bindings, and snippets from the command line. Extend your shell capabilities, change the look of your prompt and create repeatable configurations across different systems effortlessly.
|
||||||
|
|
||||||
- Zero configuration out of the box. Need to tweak a thing? [You can do that too](#using-your-fish_plugins-file).
|
- Zero configuration out of the box. Need to tweak a thing? [You can do that too](#using-your-fish_plugins-file).
|
||||||
- 100% pure Fish—easy to contribute to or modify.
|
- 100% _pure_-Fish—easy to contribute to or modify.
|
||||||
- Blazing fast concurrent plugin downloads.
|
- Blazing fast concurrent plugin downloads.
|
||||||
- Oh My Fish! plugin support.
|
- Oh My Fish! plugin support.
|
||||||
|
|
||||||
|
@ -67,10 +67,10 @@ $ fisher list \^/
|
||||||
The `update` command updates one or more plugins to their latest version.
|
The `update` command updates one or more plugins to their latest version.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
fisher update ilancosman/tide
|
fisher update jorgebucaran/fisher
|
||||||
```
|
```
|
||||||
|
|
||||||
> Use `fisher update` to update everything, including Fisher.
|
> Use `fisher update` to update everything.
|
||||||
|
|
||||||
### Removing plugins
|
### Removing plugins
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Remove installed plugins using the `remove` command.
|
||||||
fisher remove jorgebucaran/nvm.fish@1.1.0
|
fisher remove jorgebucaran/nvm.fish@1.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Someday you may want to remove everything, including Fisher.
|
You may want to remove everything, including Fisher.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
fisher list | fisher remove
|
fisher list | fisher remove
|
||||||
|
@ -99,29 +99,29 @@ nano $__fish_config_dir/fish_plugins
|
||||||
```diff
|
```diff
|
||||||
jorgebucaran/fisher
|
jorgebucaran/fisher
|
||||||
ilancosman/tide
|
ilancosman/tide
|
||||||
+ jethrokuan/z
|
+ PatrickF1/fzf.fish
|
||||||
- jorgebucaran/nvm.fish@1.1.0
|
jorgebucaran/nvm.fish@1.1.0
|
||||||
/home/jb/path/to/plugin
|
- /home/jb/path/to/plugin
|
||||||
```
|
```
|
||||||
|
|
||||||
```console
|
```console
|
||||||
fisher update
|
fisher update
|
||||||
```
|
```
|
||||||
|
|
||||||
That will install **jethrokuan/z**, remove **jorgebucaran/nvm.fish**, and update everything else.
|
That will install **PatrickF1**/**fzf.fish**, remove /**home**/**jb**/**path**/**to**/**plugin**, and update everything else.
|
||||||
|
|
||||||
## Creating a plugin
|
## Creating a plugin
|
||||||
|
|
||||||
A plugin can be any number of files in a `functions`, `conf.d`, and/or `completions` directory. Most plugins consist of a single function, or [configuration snippet](https://fishshell.com/docs/current/#initialization-files). This is what a typical plugin looks like.
|
A plugin can be any number of files in a `functions`, `conf.d`, and/or `completions` directory. Most plugins consist of a single function, or [configuration snippet](https://fishshell.com/docs/current/#initialization-files). This is what a typical plugin looks like.
|
||||||
|
|
||||||
```
|
```
|
||||||
foobar
|
ponyo
|
||||||
├── functions
|
├── functions
|
||||||
│ └── foobar.fish
|
│ └── ponyo.fish
|
||||||
├── completions
|
├── completions
|
||||||
│ └── foobar.fish
|
│ └── ponyo.fish
|
||||||
└── conf.d
|
└── conf.d
|
||||||
└── foobar.fish
|
└── ponyo.fish
|
||||||
```
|
```
|
||||||
|
|
||||||
Non `.fish` files as well as directories inside those locations will be copied to `$fisher_path` under `functions`, `conf.d`, or `completions` respectively.
|
Non `.fish` files as well as directories inside those locations will be copied to `$fisher_path` under `functions`, `conf.d`, or `completions` respectively.
|
||||||
|
@ -133,17 +133,17 @@ Plugins are notified as they are being installed, updated, or removed via [Fish
|
||||||
> `--on-event` functions must already be loaded when their event is emitted. So, put your event handlers in the `conf.d` directory.
|
> `--on-event` functions must already be loaded when their event is emitted. So, put your event handlers in the `conf.d` directory.
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
# Defined in foobar/conf.d/foobar.fish
|
# Defined in ponyo/conf.d/ponyo.fish
|
||||||
|
|
||||||
function _foobar_install --on-event foobar_install
|
function _ponyo_install --on-event ponyo_install
|
||||||
# Set universal variables, create bindings, and other initialization logic.
|
# Set universal variables, create bindings, and other initialization logic.
|
||||||
end
|
end
|
||||||
|
|
||||||
function _foobar_update --on-event foobar_update
|
function _ponyo_update --on-event ponyo_update
|
||||||
# Migrate resources, print warnings, and other update logic.
|
# Migrate resources, print warnings, and other update logic.
|
||||||
end
|
end
|
||||||
|
|
||||||
function _foobar_uninstall --on-event foobar_uninstall
|
function _ponyo_uninstall --on-event ponyo_uninstall
|
||||||
# Erase "private" functions, variables, bindings, and other uninstall logic.
|
# Erase "private" functions, variables, bindings, and other uninstall logic.
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue