Skip to content

Commit

Permalink
feat: Use prefix consistently for all commands
Browse files Browse the repository at this point in the history
Downside: Git must be installed in the container that is invoked with
the prefix.
Advantage: Everything is performed with the same system. E.g. no
problems with different versions of Bob inside and outside of the
container.
  • Loading branch information
ThomasFeher committed Jun 3, 2024
1 parent 2f6fa37 commit f6399f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/vim-bob.vim
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ function! s:EscapeForMakeprg(text)
endfunction

function! s:Init(path)
let l:bob_base_path = empty(a:path) ? getcwd() : fnamemodify(a:path, ':p:h')
let l:bob_base_path = !empty(a:path) ?
\ fnamemodify(a:path, ':p:h') :
\ empty(g:bob_prefix) ?
\ getcwd() : trim(system(g:bob_prefix . " pwd"))
echomsg l:bob_base_path
" not using `--directory` but `cd` instead, because when running inside of
" a container via `g:bob_prefix` we would pass the path on the host to Bob
" running in the container, where the path is very likely different
Expand Down

0 comments on commit f6399f0

Please sign in to comment.