mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 08:52:27 +02:00
Fixing the flag issue (#5447)
* Fixing the flag issue * whoops, forgot the original point of the function * Update deparse.rs * Update deparse.rs * Update deparse.rs * maybe this might work * fmt * quotation marks works now due to a rigorous check for args. * fmt and clippy * kept the original escape_quote_string(), escaped " and \ * removed script.nu * Added appropriate comments.
This commit is contained in:
@@ -17,7 +17,7 @@ use nu_cli::{
|
||||
};
|
||||
use nu_command::{create_default_context, BufferedReader};
|
||||
use nu_engine::{get_full_help, CallExt};
|
||||
use nu_parser::{escape_quote_string, parse};
|
||||
use nu_parser::{escape_quote_string, escape_quote_string_with_file, parse};
|
||||
use nu_protocol::{
|
||||
ast::{Call, Expr, Expression},
|
||||
engine::{Command, EngineState, Stack, StateWorkingSet},
|
||||
@@ -82,7 +82,7 @@ fn main() -> Result<()> {
|
||||
let mut args = std::env::args().skip(1);
|
||||
while let Some(arg) = args.next() {
|
||||
if !script_name.is_empty() {
|
||||
args_to_script.push(escape_quote_string(&arg));
|
||||
args_to_script.push(escape_quote_string_with_file(&arg, &script_name));
|
||||
} else if arg.starts_with('-') {
|
||||
// Cool, it's a flag
|
||||
let flag_value = match arg.as_ref() {
|
||||
|
Reference in New Issue
Block a user