mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 08:13:40 -05:00
add --ansi, as remarked in https://github.com/junegunn/fzf/issues/1175#issuecomment-350938973
@@ -399,7 +399,7 @@ sort -u | awk '{print "\x1b[34;1mbranch\x1b[m\t" $1}') || return
|
||||
target=$(
|
||||
(echo "$tags"; echo "$branches") |
|
||||
fzf --no-hscroll --no-multi --delimiter="\t" -n 2 \
|
||||
--preview="git log -200 --pretty=format:%s $(echo {+2..} | sed 's/$/../' )" ) || return
|
||||
--ansi --preview="git log -200 --pretty=format:%s $(echo {+2..} | sed 's/$/../' )" ) || return
|
||||
git checkout $(echo "$target" | awk '{print $2}')
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ fcoc_preview() {
|
||||
local commit
|
||||
commit=$( glNoGraph |
|
||||
fzf --no-sort --reverse --tiebreak=index --no-multi \
|
||||
--preview $_viewGitLogLine ) &&
|
||||
--ansi --preview $_viewGitLogLine ) &&
|
||||
git checkout $(echo "$commit" | sed "s/ .*//")
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ fcoc_preview() {
|
||||
fshow_preview() {
|
||||
glNoGraph |
|
||||
fzf --no-sort --reverse --tiebreak=index --no-multi \
|
||||
--preview $_viewGitLogLine \
|
||||
--ansi --preview $_viewGitLogLine \
|
||||
--header "enter to view, alt-y to copy hash" \
|
||||
--bind "enter:execute:$_viewGitLogLine | less -R" \
|
||||
--bind "alt-y:execute:$_gitLogLineToHash | xclip"
|
||||
|
||||
Reference in New Issue
Block a user