Lines Matching +full:command +full:- +full:line

2 // Use of this source code is governed by a BSD-style license that can be
5 // This class works with command lines: building and parsing.
6 // Arguments with prefixes ('--', '-', and on Windows, '/') are switches.
8 // Switches can optionally have values, delimited by '=', e.g., "-switch=value".
10 // An argument of "--" will terminate switch parsing during initialization,
11 // interpreting subsequent tokens as non-switch arguments, regardless of prefix.
13 // There is a singleton read-only CommandLine that represents the command line
45 // The native command line string type.
69 // Construct a new command line with |program| as argv[0].
72 // Construct a new command line from an argument list.
77 // process's command line and then add some flags to it. For example:
89 // By default this class will treat command-line arguments beginning with
93 // function BEFORE initializing the current process' global command line
98 // Normally when the CommandLine singleton is initialized it gets the command
99 // line via the GetCommandLineW API and then uses the shell32 API
100 // CommandLineToArgvW to parse the command line and convert it back to
108 // don't trust the CRT's parsing of the command line, but it still must be
109 // called to set up the command line. Returns false if initialization has
116 // outer library that needs to be able to terminate, and be re-initialized).
122 // command line. Note: returned value is mutable, but not thread safe;
133 // Constructs and returns the represented command line string.
136 // CAUTION! If writing a command line to the Windows registry, use
142 // single command-line parameter according to the following rules in line with
145 // need encoding, which is spaces, tabs, backslashes, and double-quotes.
146 // * Otherwise, double-quotes `arg` and in addition:
147 // * Escapes any double-quotes in `arg` with backslashes.
150 // * the backslashes end in a pre-existing double quote.
152 // https://learn.microsoft.com/en-us/search/?terms=CommandLineToArgvW and
153 // http://msdn.microsoft.com/en-us/library/17w5ykft.aspx#parsing-c-command-line-arguments.
156 // Returns the command-line string in the proper format for the Windows shell,
157 // ending with the argument placeholder "--single-argument %1". The single-
162 // NOTE: this must be used to generate the command-line string for the shell
163 // even if this command line was parsed from a string with the proper syntax,
164 // because the --single-argument switch is not preserved during parsing.
167 // Returns the represented command-line string. Allows the use of unsafe
180 // Returns the original command line string as a vector of strings.
183 // Get and Set the program part of the command line string (the first item).
187 // Returns true if this command line contains the given switch.
205 // Append a switch [with optional value] to the command line.
218 // Copies a set of switches (and any values) from another command line.
224 // Get the remaining arguments to the command.
227 // Append an argument to the command line. Note that the argument is quoted
228 // properly such that it is interpreted as one argument to the target command.
229 // AppendArg is primarily for ASCII; non-ASCII input is interpreted as UTF-8.
235 // Append the switches and arguments from another command line to this one.
239 // Insert a command before the current command.
240 // Common for debuggers, like "gdb --args".
244 // Initialize by parsing the given command line string.
248 // Returns true if the command line had the --single-argument switch, and
250 // command line is parsed, and is not changed after it is parsed.
305 // after |single_arg_switch_string| + <a single character> as the command
306 // line's single argument, and dropping any arguments previously parsed. The
307 // command line must contain |single_arg_switch_string|, and the argument, if
310 // NOTE: the single-argument switch is not preserved after parsing;
312 // command-line string with single-argument switch.
316 // ParseFromString(). Empty if this command line was not parsed from a string,
320 // Set to true if the command line had --single-argument when initially
321 // parsed. It does not change if the command line mutates after initial
326 // The singleton CommandLine representing the current process's command line.
329 // The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
332 // Parsed-out switch keys and values.