Searched refs:String (Results 1 – 6 of 6) sorted by relevance
/NovaShell/src/shell/command/ |
H A D | mod.rs | 15 $func as fn(&Vec<String>) -> Result<(), ExecuteErrorType>, 20 type CommandMap = HashMap<String, fn(&Vec<String>) -> Result<(), ExecuteErrorType>>; 45 let mut insert = |tuple: (String, fn(&Vec<String>) -> Result<(), ExecuteErrorType>)| { in init() 57 pub fn shell_cmd_cd(args: &Vec<String>) -> Result<(), ExecuteErrorType> { in shell_cmd_cd() 59 0 => String::from(ROOT_PATH), in shell_cmd_cd() 77 pub fn shell_cmd_exec(args: &Vec<String>) -> Result<(), ExecuteErrorType> { in shell_cmd_exec() 149 fn shell_cmd_reboot(args: &Vec<String>) -> Result<(), ExecuteErrorType> { in shell_cmd_reboot() 158 fn shell_cmd_free(args: &Vec<String>) -> Result<(), ExecuteErrorType> { in shell_cmd_free() 188 let str = String::from_utf8(buf).unwrap(); in shell_cmd_free() 225 fn shell_cmd_help(args: &Vec<String>) -> Result<(), ExecuteErrorType> { in shell_cmd_help() [all …]
|
H A D | help.rs | 3 type HelpMap = HashMap<String, fn() -> ()>; 29 let mut insert = |tuple: (String, fn() -> ())| map.insert(tuple.0, tuple.1); in init()
|
/NovaShell/src/ |
H A D | parser.rs | 15 Word(String), // 普通的命令或选项 16 Symbol(String), // 特殊符号 38 name: String, 39 args: Vec<String>, 46 name: &String, in new() argument 47 args: &[String], in new() argument 64 File(String), 69 pub fn from_string(str: &String) -> Option<RedirectTarget> { in from_string() 89 pub fn from_string(str: &String) -> Option<RedirectMode> { in from_string() 100 UnexpectedInput(String), [all …]
|
H A D | env.rs | 38 for str in String::from_utf8(buf).unwrap().split('\n') { in read_env() 45 pub fn current_dir() -> String { in current_dir()
|
/NovaShell/src/shell/ |
H A D | mod.rs | 33 history_path: String, 35 backend_thread: ThreadManager<(String, Vec<Pipeline>), Child>, 54 fn create_backend_thread() -> ThreadManager<(String, Vec<Pipeline>), Child> { in create_backend_thread() 56 let (p_s, c_r) = std::sync::mpsc::channel::<(String, Vec<Pipeline>)>(); in create_backend_thread() 116 let input_command = String::from_utf8(command_bytes.clone()).unwrap(); in exec_commands_in_line() 264 let str = String::from_utf8(buf.clone()).unwrap(); in readline() 270 let mut fragments: Vec<String> = Vec::new(); in readline() 271 let mut stack: String = String::with_capacity(str.len()); in readline() 344 String::from_utf8(self.printer.buf.borrow().to_vec()).unwrap() in readline() 395 pub fn complete_command(command: &str) -> (&str, Vec<String>) { in complete_command() argument [all …]
|
H A D | printer.rs | 61 String::from_utf8(buf[self.cursor..].to_vec()).unwrap() in insert() 90 String::from_utf8(self.buf.deref().borrow()[self.cursor..].to_vec()).unwrap() in delete() 153 String::from_utf8(new_buf.deref().borrow()[..].to_vec()).unwrap() in change_line() 176 user_name: String, 177 computer_name: String, 178 path: String,
|