filter incomplete lookups on uci show
[project/uci.git] / cli.c
diff --git a/cli.c b/cli.c
index b7071a1..1f08100 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -202,6 +202,8 @@ static int package_cmd(int cmd, char *tuple)
                uci_export(ctx, stdout, ptr.p, true);
                break;
        case CMD_SHOW:
+               if (!(ptr.flags & UCI_LOOKUP_COMPLETE))
+                       return 1;
                switch(e->type) {
                        case UCI_TYPE_PACKAGE:
                                uci_show_package(ptr.p);
@@ -470,7 +472,8 @@ static int uci_cmd(int argc, char **argv)
                cmd = CMD_RENAME;
        else if (!strcasecmp(argv[0], "revert"))
                cmd = CMD_REVERT;
-       else if (!strcasecmp(argv[0], "del"))
+       else if (!strcasecmp(argv[0], "del") ||
+                !strcasecmp(argv[0], "delete"))
                cmd = CMD_DEL;
        else if (!strcasecmp(argv[0], "import"))
                cmd = CMD_IMPORT;