Skip to content

Commit

Permalink
fix: Project: do not log and use the directory
Browse files Browse the repository at this point in the history
There is not much use in storing the directory, because it is normally
the current directory.
Without the directory the logs are portable, i.e., they can be moved to
different locations along with their containing directory and a project
can be started there.
  • Loading branch information
ThomasFeher committed Jun 3, 2024
1 parent f1c580d commit 7c5cf7e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions plugin/vim-bob.vim
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,7 @@ function! s:ParseProjectArgs(args)
endif
let g:bob_prefix = l:match[1]
" parse directory
let l:line = getline(l:line_nr + 3)
let l:match = matchlist(l:line, ' directory: \(.*\)')
if empty(l:match)
throw 'internal error: expected entry `directory` at line ' . (l:line_nr + 3)
endif
call s:Init(match[1])
call s:Init(expand("%:p:h"))
" parse configuration
let l:line = getline(l:line_nr + 2)
let l:match = matchlist(l:line, ' configuration: \(.*\)')
Expand Down Expand Up @@ -284,7 +279,6 @@ function! s:Project(bang, ...)
let l:log_string = ["- " . l:package . ":",
\" prefix: " . g:bob_prefix,
\" configuration: " . l:args_config,
\" directory: " . s:bob_base_path,
\" arguments: [" . l:args_args . "]",
\" date: \"" . strftime('%FT%H:%M:%S') . "\"",
\" command: " . l:project_command]
Expand Down

0 comments on commit 7c5cf7e

Please sign in to comment.