mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-20 09:33:42 -05:00
fshow with --multi
13
Examples.md
13
Examples.md
@@ -133,15 +133,16 @@ fco() {
|
|||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# fshow - git show commit
|
# fshow - git commit browser
|
||||||
fshow() {
|
fshow() {
|
||||||
local sha q
|
local out sha q
|
||||||
while sha=$(
|
while out=$(
|
||||||
git log --decorate=full --graph --oneline --color=always |
|
git log --decorate=full --graph --oneline --color=always |
|
||||||
fzf --ansi --no-multi --no-sort --reverse --query="$q" --print-query); do
|
fzf --ansi --multi --no-sort --reverse --query="$q" --print-query); do
|
||||||
q=$(head -1 <<< "$sha")
|
q=$(head -1 <<< "$out")
|
||||||
sha=$(sed '1d;s/^[^a-z0-9]*//;/^$/d' <<< "$sha" | awk '{print $1}')
|
while read sha; do
|
||||||
[ -n "$sha" ] && git show --color=always $sha | less -R
|
[ -n "$sha" ] && git show --color=always $sha | less -R
|
||||||
|
done < <(sed '1d;s/^[^a-z0-9]*//;/^$/d' <<< "$out" | awk '{print $1}')
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user