skywind3000 / asyncrun.vim

:rocket: Run Async Shell Commands in Vim 8.0 / NeoVim and Output to the Quickfix Window !!
https://www.vim.org/scripts/script.php?script_id=5431
MIT License
1.84k stars 109 forks source link

update info on compatibility with fugitive #222

Closed Konfekt closed 3 years ago

Konfekt commented 3 years ago

The wiki entry on vim-fugitive is out of date since https://github.com/tpope/vim-fugitive/commit/d4bcc75ef6449c0e5592513fb1e0a42b017db9ca

Instead custom commands

    command! -bang -bar -nargs=* Gpush execute 'AsyncRun<bang> -cwd=' .
          \ fnameescape(FugitiveGitDir()) 'git push' <q-args>
    command! -bang -bar -nargs=* Gfetch execute 'AsyncRun<bang> -cwd=' .
          \ fnameescape(FugitiveGitDir()) 'git fetch' <q-args>

must be added.

skywind3000 commented 3 years ago

fixed, thanks

Konfekt commented 3 years ago

Now FugitiveGitDir returns the path of the .git subdir instead of that of the repository. To make the custom commands work again, replace in all lines

fnameescape(FugitiveGitDir()) by fnamemodify(FugitiveGitDir(), ":h:S").