shell/+fzf: better formatting for fzf-git-* candidates
This commit is contained in:
parent
36104366aa
commit
254e46436c
|
@ -1,8 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
git log --graph --color=always \
|
||||
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
|
||||
gui-fzf --ansi --no-sort --tiebreak=index --bind=ctrl-s:toggle-sort \
|
||||
git log --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
|
||||
fzf --ansi --no-sort --tiebreak=index --bind=ctrl-s:toggle-sort \
|
||||
--bind "ctrl-m:execute:
|
||||
(grep -o '[a-f0-9]\{7\}' | head -1 |
|
||||
xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF'
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
# + git checkout `fzf-git-sha`
|
||||
# + git commit --fixup `fzf-git-sha`
|
||||
|
||||
commits=$(git log --color=always --pretty=oneline --abbrev-commit --reverse) &&
|
||||
commit=$(echo "$commits" | fzf --tac +s +m -e --ansi --reverse) &&
|
||||
commits=$(git log --color=always --abbrev-commit --reverse --format="%C(auto)%h%d %s %C(black)%C(bold)%cr") &&
|
||||
commit=$(echo "$commits" | gui-fzf --tac +s +m -e --ansi) &&
|
||||
echo -n $(echo "$commit" | sed "s/ .*//")
|
||||
|
|
Loading…
Reference in a new issue