From 40fa8026e7b6df158e65eeb4d511af40e03b8bd4 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 13 Jun 2021 14:48:57 +0000 Subject: lpass: add cmd 'show' Now you need to use the following command to list the contents of the password manager: lpass show [passname] If the command name is missing or was typed incorrectly, the 'help' command will be executed and will return 1. It will simplify the program when i add bash completion. --- src/lpass.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lpass.c') diff --git a/src/lpass.c b/src/lpass.c index a466d5d..dd28dcf 100644 --- a/src/lpass.c +++ b/src/lpass.c @@ -35,6 +35,7 @@ struct cmd_struct { static struct cmd_struct commands[] = { { "init", cmd_init }, { "insert", cmd_insert }, + { "show", cmd_showtree }, { "edit", cmd_edit }, { "generate", cmd_generate }, { "rm", cmd_remove }, @@ -89,5 +90,6 @@ int main(int argc, char *argv[]) if(ptr) return ptr->func(--argc, ++argv); - return cmd_showtree(--argc, ++argv); + cmd_help(argc, argv); + return 1; } \ No newline at end of file -- cgit v1.2.3-18-g5258