mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-19 00:53:42 -05:00
Add fshow
14
Examples.md
14
Examples.md
@@ -132,6 +132,20 @@ fco() {
|
||||
}
|
||||
```
|
||||
|
||||
```sh
|
||||
# fshow - git show commit
|
||||
fshow() {
|
||||
local sha q
|
||||
while sha=$(
|
||||
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;/[a-z0-9]/!d;s/^[^a-z0-9]*//' <<< "$sha" | awk '{print $1}')
|
||||
[ -n "$sha" ] && git show --color=always $sha | less -R
|
||||
done
|
||||
}
|
||||
```
|
||||
|
||||
### Tags
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user