Home
last modified time | relevance | path

Searched refs:ExecuteErrorType (Results 1 – 2 of 2) sorted by relevance

/NovaShell/src/shell/command/
H A Dmod.rs7 use crate::parser::ExecuteErrorType;
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() argument
63 return Err(ExecuteErrorType::NotDir(path.to_str().unwrap().to_string())); in shell_cmd_cd()
67 Err(_) => return Err(ExecuteErrorType::FileNotFound(args.get(0).unwrap().clone())), in shell_cmd_cd()
69 _ => return Err(ExecuteErrorType::TooManyArguments), in shell_cmd_cd()
72 return Err(ExecuteErrorType::ExecuteFailed); in shell_cmd_cd()
77 pub fn shell_cmd_exec(args: &Vec<String>) -> Result<(), ExecuteErrorType> { in shell_cmd_exec() argument
[all …]
/NovaShell/src/
H A Dparser.rs282 err_type: ExecuteErrorType,
292 ExecuteErrorType::CommandNotFound => eprintln!("Command not found"), in handle()
293 ExecuteErrorType::FileNotFound(file) => eprintln!("Not a file or directory: {}", file), in handle()
294 ExecuteErrorType::NotDir(ref path) => eprintln!("Not a Directory: {path}"), in handle()
295 ExecuteErrorType::NotFile(ref path) => eprintln!("Not a File: {path}"), in handle()
296 ExecuteErrorType::PermissionDenied(ref file) => eprintln!("File open denied: {file}"), in handle()
297 ExecuteErrorType::ExecuteFailed => eprintln!("Command execute failed"), in handle()
298 ExecuteErrorType::ExitWithCode(exit_code) => { in handle()
301 ExecuteErrorType::ProcessTerminated => eprintln!("Process terminated"), in handle()
302 ExecuteErrorType::FileOpenFailed(file) => { in handle()
[all …]