cmd/v: reimplement -path flag
parent
b1bbb17254
commit
b4eadb9030
|
@ -8,6 +8,7 @@ import strings
|
||||||
|
|
||||||
pub const (
|
pub const (
|
||||||
path_separator = '/'
|
path_separator = '/'
|
||||||
|
path_delimiter = ':'
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -7,6 +7,7 @@ import strings
|
||||||
|
|
||||||
pub const (
|
pub const (
|
||||||
path_separator = '\\'
|
path_separator = '\\'
|
||||||
|
path_delimiter = ';'
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ref - https://docs.microsoft.com/en-us/windows/desktop/winprog/windows-data-types
|
// 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
|
res.backend = b
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
'-path' {
|
||||||
|
path := cmdline.option(current_args, '-path', '')
|
||||||
|
res.lookup_path = path.split(os.path_delimiter)
|
||||||
|
i++
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
mut should_continue := false
|
mut should_continue := false
|
||||||
for flag_with_param in list_of_flags_with_param {
|
for flag_with_param in list_of_flags_with_param {
|
||||||
|
|
Loading…
Reference in New Issue