mirror of
https://github.com/danbulant/nushell
synced 2026-05-21 21:39:15 +00:00
Limit when we expand external args (#668)
This commit is contained in:
parent
41dbc641cc
commit
b4c72e85e1
1 changed files with 7 additions and 3 deletions
|
|
@ -264,9 +264,13 @@ impl<'call> ExternalCommand<'call> {
|
|||
|
||||
for arg in &self.args {
|
||||
let arg = trim_enclosing_quotes(arg);
|
||||
let arg = nu_path::expand_path_with(arg, cwd)
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
let arg = if arg.starts_with('~') || arg.starts_with("..") {
|
||||
nu_path::expand_path_with(arg, cwd)
|
||||
.to_string_lossy()
|
||||
.to_string()
|
||||
} else {
|
||||
arg
|
||||
};
|
||||
|
||||
let arg = arg.replace("\\", "\\\\");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue