Skip to content

Commit

Permalink
Update fzf.vim - support nushell
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasha10 authored Oct 28, 2024
1 parent ff16877 commit 50c05e0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ function s:get_version(bin)
if has_key(s:versions, a:bin)
return s:versions[a:bin]
end
let command = (&shell =~ 'powershell\|pwsh' ? '&' : '') . s:fzf_call('shellescape', a:bin) . ' --version --no-height'
if &shell =~ 'powershell\|pwsh'
let command = '& ' . s:fzf_call('shellescape', a:bin) . ' --version --no-height'
elseif &shell =~# '\<nu\>$'
let command = [a:bin, '--version', '--no-height']
else
let command = s:fzf_call('shellescape', a:bin) . ' --version --no-height'
endif

let output = systemlist(command)
if v:shell_error || empty(output)
return ''
Expand Down

0 comments on commit 50c05e0

Please sign in to comment.