mirror of
https://github.com/danbulant/nushell
synced 2026-06-06 08:10:54 +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 {
|
for arg in &self.args {
|
||||||
let arg = trim_enclosing_quotes(arg);
|
let arg = trim_enclosing_quotes(arg);
|
||||||
let arg = nu_path::expand_path_with(arg, cwd)
|
let arg = if arg.starts_with('~') || arg.starts_with("..") {
|
||||||
.to_string_lossy()
|
nu_path::expand_path_with(arg, cwd)
|
||||||
.to_string();
|
.to_string_lossy()
|
||||||
|
.to_string()
|
||||||
|
} else {
|
||||||
|
arg
|
||||||
|
};
|
||||||
|
|
||||||
let arg = arg.replace("\\", "\\\\");
|
let arg = arg.replace("\\", "\\\\");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue