浏览代码

Utilities: Make `xargs` stop parsing options on first non-option

Jelle Raaijmakers 4 年之前
父节点
当前提交
afbbcde150
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Userland/Utilities/xargs.cpp

+ 1 - 0
Userland/Utilities/xargs.cpp

@@ -54,6 +54,7 @@ int main(int argc, char** argv)
     int max_bytes_for_one_command = ARG_MAX;
 
     Core::ArgsParser args_parser;
+    args_parser.set_stop_on_first_non_option(true);
     args_parser.set_general_help("Read arguments from stdin and interpret them as command-line arguments for another program. See also: 'man xargs'.");
     args_parser.add_option(placeholder, "Placeholder string to be replaced in arguments", "replace", 'I', "placeholder");
     args_parser.add_option(split_with_nulls, "Split input items with the null character instead of newline", "null", '0');