mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
Preview only show specified files.
This commit is contained in:
parent
5deb20fef9
commit
737e573032
|
|
@ -62,7 +62,7 @@ __forgit_get_git_color() {
|
||||||
# git commit browser
|
# git commit browser
|
||||||
__forgit_log() {
|
__forgit_log() {
|
||||||
__forgit_inside_work_tree || return 1
|
__forgit_inside_work_tree || return 1
|
||||||
local cmd="echo {} |grep -o '[a-f0-9]\{7\}' |head -1 |xargs -I% git show --color=always % $forgit_emojify $forgit_fancy"
|
local cmd="echo {} |grep -o '[a-f0-9]\{7\}' |head -1 |xargs -I% git show --color=always % $@ $forgit_emojify $forgit_fancy"
|
||||||
eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $@ $forgit_emojify" |
|
eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $@ $forgit_emojify" |
|
||||||
__forgit_fzf +s +m --tiebreak=index \
|
__forgit_fzf +s +m --tiebreak=index \
|
||||||
--bind="enter:execute($cmd |LESS='-R' less)" \
|
--bind="enter:execute($cmd |LESS='-R' less)" \
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ forgit::inside_work_tree() {
|
||||||
# git commit viewer
|
# git commit viewer
|
||||||
forgit::log() {
|
forgit::log() {
|
||||||
forgit::inside_work_tree || return 1
|
forgit::inside_work_tree || return 1
|
||||||
local cmd="echo {} |grep -o '[a-f0-9]\{7\}' |head -1 |xargs -I% git show --color=always % $forgit_emojify $forgit_fancy"
|
local cmd="echo {} |grep -o '[a-f0-9]\{7\}' |head -1 |xargs -I% git show --color=always % $@ $forgit_emojify $forgit_fancy"
|
||||||
eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $@ $forgit_emojify" |
|
eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $@ $forgit_emojify" |
|
||||||
forgit::fzf +s +m --tiebreak=index \
|
forgit::fzf +s +m --tiebreak=index \
|
||||||
--bind="enter:execute($cmd |LESS='-R' less)" \
|
--bind="enter:execute($cmd |LESS='-R' less)" \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue