[[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:
parent
45d39f5711
commit
d0042b9dee
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue