Searched refs:str (Results 1 – 5 of 5) sorted by relevance
7 pub const ROOT_PATH: &str = "/";12 pub const ENV_FILE_PATH: &str = "/etc/profile";38 for str in String::from_utf8(buf).unwrap().split('\n') { in read_env()39 if let Some(index) = str.find('=') { in read_env()40 std::env::set_var(&str[..index], &str[index + 1..]); in read_env()
69 pub fn from_string(str: &String) -> Option<RedirectTarget> { in from_string()70 if str.starts_with("&") { in from_string()71 if let Ok(fd) = str.split_at(1).1.parse::<i32>() { in from_string()77 Some(RedirectTarget::File(str.clone())) in from_string()89 pub fn from_string(str: &String) -> Option<RedirectMode> { in from_string()90 match str.as_str() { in from_string()108 ParseError::UnexpectedInput(str) => eprintln!("Unexpected input: \"{str}\""), in handle()109 ParseError::UnsupportedToken(str) => eprintln!("Unsupported token: \"{str}\""), in handle()110 ParseError::UnexpectedToken(str) => eprintln!("Unexpected token: \"{str}\""), in handle()118 fn parse_env(str: &str) -> String { in parse_env()[all …]
28 const DEFAULT_HISTORY_COMMANDS_PATH: &str = "/history_commands.txt";264 let str = String::from_utf8(buf.clone()).unwrap(); in readline() localVariable269 let iter = str.chars(); in readline()271 let mut stack: String = String::with_capacity(str.len()); in readline()395 pub fn complete_command(command: &str) -> (&str, Vec<String>) { in complete_command() argument405 pub fn complete_path(incomplete_path: &str) -> (&str, Vec<String>) { in complete_path() argument408 let incomplete_name: &str; in complete_path()
40 pub fn name(&self) -> Option<&str> { in name() argument
188 let str = String::from_utf8(buf).unwrap(); in shell_cmd_free() localVariable189 let info = str in shell_cmd_free()191 .filter_map(|str| str.parse::<u64>().ok()) in shell_cmd_free()235 let pair = args.get(0).unwrap().split('=').collect::<Vec<&str>>(); in shell_cmd_export()