Allow to enter regular expression as argument to ls command, to get only matching passwords.

This commit is contained in:
Oleksandr Kozachuk
2022-12-14 15:12:36 +01:00
parent 4207279364
commit 2a05254415
3 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ peg::parser! {
rule mode() -> Mode = m:(umode() / rmode()) { m }
rule help_cmd() -> Command<'input> = "help" { Command::Help }
rule quit_cmd() -> Command<'input> = "quit" { Command::Quit }
rule ls_cmd() -> Command<'input> = "ls" { Command::Ls }
rule ls_cmd() -> Command<'input> = "ls" f:comment()? { Command::Ls(f.unwrap_or(".".to_string())) }
rule add_cmd() -> Command<'input> = "add" _ name:name() { Command::Add(Rc::new(RefCell::new(name))) }
rule error_cmd() -> Command<'input> = "error" _ e:$(([' '..='~'])+) { Command::Error(LKErr::Error(e)) }
rule mv_cmd() -> Command<'input> = "mv" _ name:word() _ folder:word() { Command::Mv(name, folder) }