args
fn args() -> Result<Vec<string>, EnvError> Import
Source: use env::{args}; compiler/src/builtin_docs/env.hy Returns the program’s command-line arguments, starting with the program name.
Always Ok. Needs no permission.
Returns#
Result<Vec<string>, EnvError>
Examples#
use env::{args};
use tests::assert;
let argv = match args() {
Result::Ok(a) => a,
Result::Err(_) => Vec::new(),
};
assert!(argv.len() >= 1);
See also#
var: Returns the value of the environment variablename.set_var: Sets the environment variablenametovaluefor this process.remove_var: Removes the environment variablenamefrom this process.cwd: Returns the current working directory as an absolute path.set_cwd: Changes the current working directory of the whole process.exit: Ends the process at once with exit statuscode.exec: Runsprogramwith the argumentsargvand waits for it to finish.