Skip to content

Commit

Permalink
refactor: separator for ARGC_COMPLETIONS_PATH is ; on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Nov 13, 2023
1 parent 8d6232e commit 3924795
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bin/argc/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,13 @@ pub fn search_completion_script(args: &mut Vec<String>) -> Option<PathBuf> {
None
};
let mut handlers = vec![];
#[cfg(not(target_os = "windows"))]
let sep = ":";
#[cfg(target_os = "windows")]
let sep = ";";
for path in search_paths
.split(':')
.filter(|v| !v.is_empty() && *v != ":")
.split(sep)
.filter(|v| !v.is_empty() && *v != sep)
{
let path = path.to_string();
let cmd = cmd.to_string();
Expand Down

0 comments on commit 3924795

Please sign in to comment.