mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
[[B]Commit] Fix preview command for fish shell (#518)
* Fish shell doesn't like <<< Echo to pipe instead * Only return the first match Useful if the commit message has a project tracker id that looks similar to a git commit hash
This commit is contained in:
committed by
Junegunn Choi
parent
45d39f5711
commit
d0042b9dee
@@ -1124,7 +1124,7 @@ function! s:commits(buffer_local, args)
|
||||
|
||||
if !s:is_win && &columns > s:wide
|
||||
call extend(options.options,
|
||||
\ ['--preview', 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --format=format: --color=always | head -200'])
|
||||
\ ['--preview', 'echo {} | grep -o "[a-f0-9]\{7,\}" | head -1 | xargs git show --format=format: --color=always | head -200'])
|
||||
endif
|
||||
|
||||
return s:fzf(a:buffer_local ? 'bcommits' : 'commits', options, a:args)
|
||||
|
||||
Reference in New Issue
Block a user