diff --git a/src/tools/kdb/metaget.cpp b/src/tools/kdb/metaget.cpp index d98398ed6bc..24de7e794fd 100644 --- a/src/tools/kdb/metaget.cpp +++ b/src/tools/kdb/metaget.cpp @@ -27,14 +27,15 @@ int MetaGetCommand::execute (Cmdline const & cl) { throw invalid_argument ("Need 2 arguments"); } - Key parentKey = cl.createKey (0); + Key k = cl.createKey (0); + Key parentKey = cl.getParentKey (cl.createKey (0)); string metaname = cl.arguments[1]; KeySet conf; kdb.get (conf, parentKey); printWarnings (cerr, parentKey, cl.verbose, cl.debug); - Key k = conf.lookup (parentKey); + k = conf.lookup (k); if (!k) { diff --git a/src/tools/kdb/metaget.hpp b/src/tools/kdb/metaget.hpp index 02a9f5f7447..e681da8cfee 100644 --- a/src/tools/kdb/metaget.hpp +++ b/src/tools/kdb/metaget.hpp @@ -23,7 +23,7 @@ class MetaGetCommand : public Command virtual std::string getShortOptions () override { - return "n"; + return "nN"; } virtual std::string getSynopsis () override diff --git a/src/tools/kdb/metaset.cpp b/src/tools/kdb/metaset.cpp index 80138311a28..26decaaee15 100644 --- a/src/tools/kdb/metaset.cpp +++ b/src/tools/kdb/metaset.cpp @@ -29,14 +29,16 @@ int MetaSetCommand::execute (Cmdline const & cl) } string metaname = cl.arguments[1]; - Key parentKey = cl.createKey (0); - string keyname = parentKey.getName (); + Key k = cl.createKey (0); + string keyname = k.getName (); bool cascadingWrite = keyname[0] == '/'; + Key parentKey = cl.getParentKey (k); + KeySet conf; kdb.get (conf, parentKey); - Key k = conf.lookup (parentKey); + k = conf.lookup (k); if (!k) { diff --git a/src/tools/kdb/metaset.hpp b/src/tools/kdb/metaset.hpp index 72557d4b9c4..fe789009d1d 100644 --- a/src/tools/kdb/metaset.hpp +++ b/src/tools/kdb/metaset.hpp @@ -24,7 +24,7 @@ class MetaSetCommand : public Command virtual std::string getShortOptions () override { - return "q"; + return "qNf"; } virtual std::string getSynopsis () override