Preview only show specified files.

Former-commit-id: 737e573032
This commit is contained in:
Wenxuan 2018-11-26 17:52:46 +08:00
parent c0d1c86459
commit bd2974e397
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ __forgit_get_git_color() {
# git commit browser
__forgit_log() {
__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" |
__forgit_fzf +s +m --tiebreak=index \
--bind="enter:execute($cmd |LESS='-R' less)" \

View file

@ -55,7 +55,7 @@ forgit::inside_work_tree() {
# git commit viewer
forgit::log() {
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" |
forgit::fzf +s +m --tiebreak=index \
--bind="enter:execute($cmd |LESS='-R' less)" \