mirror of
https://github.com/nushell/nushell.git
synced 2025-01-23 06:39:17 +01:00
nu-cli/completions: fix file completions with quotes (#5242)
* nu-cli/completions: fix file completions with quotes * wrap with backticks
This commit is contained in:
parent
4d7b86f278
commit
c0ce1e9057
@ -136,6 +136,11 @@ pub fn file_path_completion(
|
||||
path = format!("\'{}\'", path);
|
||||
}
|
||||
|
||||
// Fix files or folders with quotes
|
||||
if path.contains('\'') || path.contains('"') {
|
||||
path = format!("`{}`", path);
|
||||
}
|
||||
|
||||
Some((span, path))
|
||||
} else {
|
||||
None
|
||||
|
Loading…
Reference in New Issue
Block a user