Fixed readme and added fzf check to zsh to be the same as fish version

Former-commit-id: 4ab5a2daae
This commit is contained in:
Christopher Apple 2019-11-05 08:54:29 -07:00
parent a05a43891b
commit db619daa6e
2 changed files with 12 additions and 3 deletions

View file

@ -10,11 +10,19 @@
### Try Online
Run the following command in your shell to try `forgit` without installing(for both `bash` and `zsh`):
Run the following command in your shell to try `forgit` without installing:
##### Bash and ZSH
``` bash
source <(curl -Ss https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.zsh)
```
##### Fish
``` fish
source (curl -Ss https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.fish | psub)
```
### Installation using a ZSH Plugin manager
### [Zplug](https://github.com/zplug/zplug)
``` zsh
zplug 'wfxr/forgit'
@ -30,9 +38,9 @@ zgen load 'wfxr/forgit'
antigen bundle 'wfxr/forgit'
```
### Manually
### Manual Installation
Download and source `forgit.plugin.zsh` or `forgit.plugin.sh` in your shell config.
Download and source `forgit.plugin.zsh`, `forgit.plugin.sh`, or `forgit.plugin.fish` in your shell config.
## Commands

View file

@ -1,4 +1,5 @@
# MIT (c) Wenxuan Zhang
hash fzf > /dev/null 2>&1 || {echo "FZF not found and is requried for forgit" && return 1}
forgit::warn() { printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$@" >&2; }
forgit::info() { printf "%b[Info]%b %s\n" '\e[0;32m' '\e[0m' "$@" >&2; }