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