From a32f2f991a5584f1139612f3fe6524d4033ae68a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 26 May 2014 23:06:32 -0400 Subject: [PATCH] Context - A helper command (e.g. _ids) should be considered a "cmd", "readcmd" and "helper" entity. --- src/Context.cpp | 3 ++- src/args.cpp | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 4560b2cbb..83a5ea448 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -160,7 +160,8 @@ int Context::initialize (int argc, const char** argv) if (cmd->first[0] == '_') parser.entity ("helper", cmd->first); - else if (cmd->second->read_only ()) + + if (cmd->second->read_only ()) parser.entity ("readcmd", cmd->first); else parser.entity ("writecmd", cmd->first); diff --git a/src/args.cpp b/src/args.cpp index 70ecf7077..b8524a8e6 100644 --- a/src/args.cpp +++ b/src/args.cpp @@ -111,22 +111,22 @@ int main (int argc, const char** argv) parser.entity ("cmd", "undo"); parser.entity ("writecmd", "undo"); // Helper commands. - parser.entity ("cmd", "_aliases"); parser.entity ("helper", "_aliases"); - parser.entity ("cmd", "_columns"); parser.entity ("helper", "_columns"); - parser.entity ("cmd", "_commands"); parser.entity ("helper", "_commands"); - parser.entity ("cmd", "_config"); parser.entity ("helper", "_config"); - parser.entity ("cmd", "_get"); parser.entity ("helper", "_get"); - parser.entity ("cmd", "_ids"); parser.entity ("helper", "_ids"); - parser.entity ("cmd", "_projects"); parser.entity ("helper", "_projects"); - parser.entity ("cmd", "_show"); parser.entity ("helper", "_show"); - parser.entity ("cmd", "_tags"); parser.entity ("helper", "_tags"); - parser.entity ("cmd", "_udas"); parser.entity ("helper", "_udas"); - parser.entity ("cmd", "_urgency"); parser.entity ("helper", "_urgency"); - parser.entity ("cmd", "_uuids"); parser.entity ("helper", "_uuids"); - parser.entity ("cmd", "_version"); parser.entity ("helper", "_version"); - parser.entity ("cmd", "_zshcommands"); parser.entity ("helper", "_zshcommands"); - parser.entity ("cmd", "_zshids"); parser.entity ("helper", "_zshids"); - parser.entity ("cmd", "_zshuuids"); parser.entity ("helper", "_zshuuids"); + parser.entity ("cmd", "_aliases"); parser.entity ("readcmd", "_aliases"); parser.entity ("helper", "_aliases"); + parser.entity ("cmd", "_columns"); parser.entity ("readcmd", "_columns"); parser.entity ("helper", "_columns"); + parser.entity ("cmd", "_commands"); parser.entity ("readcmd", "_commands"); parser.entity ("helper", "_commands"); + parser.entity ("cmd", "_config"); parser.entity ("readcmd", "_config"); parser.entity ("helper", "_config"); + parser.entity ("cmd", "_get"); parser.entity ("readcmd", "_get"); parser.entity ("helper", "_get"); + parser.entity ("cmd", "_ids"); parser.entity ("readcmd", "_ids"); parser.entity ("helper", "_ids"); + parser.entity ("cmd", "_projects"); parser.entity ("readcmd", "_projects"); parser.entity ("helper", "_projects"); + parser.entity ("cmd", "_show"); parser.entity ("readcmd", "_show"); parser.entity ("helper", "_show"); + parser.entity ("cmd", "_tags"); parser.entity ("readcmd", "_tags"); parser.entity ("helper", "_tags"); + parser.entity ("cmd", "_udas"); parser.entity ("readcmd", "_udas"); parser.entity ("helper", "_udas"); + parser.entity ("cmd", "_urgency"); parser.entity ("readcmd", "_urgency"); parser.entity ("helper", "_urgency"); + parser.entity ("cmd", "_uuids"); parser.entity ("readcmd", "_uuids"); parser.entity ("helper", "_uuids"); + parser.entity ("cmd", "_version"); parser.entity ("readcmd", "_version"); parser.entity ("helper", "_version"); + parser.entity ("cmd", "_zshcommands"); parser.entity ("readcmd", "_zshcommands"); parser.entity ("helper", "_zshcommands"); + parser.entity ("cmd", "_zshids"); parser.entity ("readcmd", "_zshids"); parser.entity ("helper", "_zshids"); + parser.entity ("cmd", "_zshuuids"); parser.entity ("readcmd", "_zshuuids"); parser.entity ("helper", "_zshuuids"); // Attributes (columns). parser.entity ("attribute", "depends");