Home
last modified time | relevance | path

Searched refs:str (Results 1 – 5 of 5) sorted by relevance

/NovaShell/src/
H A Denv.rs7 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()
H A Dparser.rs69 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 …]
/NovaShell/src/shell/
H A Dmod.rs28 const DEFAULT_HISTORY_COMMANDS_PATH: &str = "/history_commands.txt";
264 let str = String::from_utf8(buf.clone()).unwrap(); in readline() localVariable
269 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() argument
405 pub fn complete_path(incomplete_path: &str) -> (&str, Vec<String>) { in complete_path() argument
408 let incomplete_name: &str; in complete_path()
H A Dthread_manager.rs40 pub fn name(&self) -> Option<&str> { in name() argument
/NovaShell/src/shell/command/
H A Dmod.rs188 let str = String::from_utf8(buf).unwrap(); in shell_cmd_free() localVariable
189 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()