aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-06-13 14:48:57 +0000
committerJoursoir <chat@joursoir.net>2021-06-13 15:28:18 +0000
commit40fa8026e7b6df158e65eeb4d511af40e03b8bd4 (patch)
tree8f0ff2ba110dba599df8c1ed36b9aea5b74773c5
parenta05ceb98259b949dcc248c744c809df3a7d06233 (diff)
downloadlock-password-40fa8026e7b6df158e65eeb4d511af40e03b8bd4.tar.gz
lock-password-40fa8026e7b6df158e65eeb4d511af40e03b8bd4.tar.bz2
lock-password-40fa8026e7b6df158e65eeb4d511af40e03b8bd4.zip
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.
-rw-r--r--src/lpass.c4
1 files changed, 3 insertions, 1 deletions
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