Merge pull request #88 from cjappl/glo-slice

added glo slice to fish, warning about fish 3.1
This commit is contained in:
Chris Apple 2020-04-20 15:45:43 -07:00 committed by GitHub
commit 35c61e6873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -18,7 +18,7 @@ Run the following command in your shell to try `forgit` without installing:
``` bash
source <(curl -Ss https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.zsh)
```
##### Fish
##### Fish 3.0 (NOTE: 3.1 is not currently supported)
``` fish
source (curl -Ss https://raw.githubusercontent.com/wfxr/forgit/master/forgit.plugin.fish | psub)
```

View file

@ -27,7 +27,9 @@ type -q emojify >/dev/null 2>&1 && set forgit_emojify '|emojify'
# git commit viewer
function forgit::log
forgit::inside_work_tree || return 1
set cmd "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % $argv | $forgit_pager"
set files (echo $argv | sed -nE 's/.* -- (.*)/\1/p')
set cmd "echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % -- $files | $forgit_pager"
if test -n "$FORGIT_COPY_CMD"
set copy_cmd $FORGIT_COPY_CMD