mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cmd/v: reimplement -path flag
This commit is contained in:
parent
b1bbb17254
commit
b4eadb9030
@ -8,6 +8,7 @@ import strings
|
||||
|
||||
pub const (
|
||||
path_separator = '/'
|
||||
path_delimiter = ':'
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -7,6 +7,7 @@ import strings
|
||||
|
||||
pub const (
|
||||
path_separator = '\\'
|
||||
path_delimiter = ';'
|
||||
)
|
||||
|
||||
// Ref - https://docs.microsoft.com/en-us/windows/desktop/winprog/windows-data-types
|
||||
|
@ -248,6 +248,11 @@ pub fn parse_args(args []string) (&Preferences, string) {
|
||||
res.backend = b
|
||||
i++
|
||||
}
|
||||
'-path' {
|
||||
path := cmdline.option(current_args, '-path', '')
|
||||
res.lookup_path = path.split(os.path_delimiter)
|
||||
i++
|
||||
}
|
||||
else {
|
||||
mut should_continue := false
|
||||
for flag_with_param in list_of_flags_with_param {
|
||||
|
Loading…
Reference in New Issue
Block a user