summaryrefslogtreecommitdiffstats
path: root/command_manager.py
Commit message (Collapse)AuthorAgeFilesLines
* command_manager: help2man compat. alternative invocationJan Pokorný2015-12-171-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main+command_manager: allow symlink shortcuts to subcommandsJan Pokorný2015-06-191-2/+3
| | | | | | | | # ln -s /bin/clufter /bin/ccs-disable-rg # ccs-disable-rg -h | head -n1 > Usage: ccs-disable-rg [<cmd option ...>] Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command et al.: consider common (short)opts (avoid them)Jan Pokorný2015-05-291-3/+4
| | | | | | | Because we need to pass extra piece of information to the responsible function, it cannot be arranged as a property any longer. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: tweak cmds listing, w/ or w/o externalJan Pokorný2015-04-151-3/+7
| | | | | | | | | | Also account for possibility of unresolved/None command (similar to previous commit). [Alternatively, should we just verbosely drop the such ones and hence make any subsequent code easier?] Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Mass change: import logging -> from logging import getLoggerJan Pokorný2015-01-091-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: pretty_cmds can distinguish ext. pluginsJan Pokorný2015-01-091-9/+16
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: increase default width of pretty_cmdsJan Pokorný2015-01-091-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: unify list indentation with "-l" outputJan Pokorný2014-12-111-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: plugin can be N/A just due to previous failJan Pokorný2014-12-081-0/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: sanitize _init_plugins -> _resolve kwargs passingJan Pokorný2014-11-141-1/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Make CLI interface work again after bfbb5c8(?)Jan Pokorný2014-09-051-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: remove remnant of commit bfbb5c8Jan Pokorný2014-09-051-1/+0
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: 'implicit' superseded (by far) with 'init_lookup'Jan Pokorný2014-09-051-13/+0
| | | | | | + reflect that in tests Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* {command,filter}_manager: finalize "pick what's needed"Jan Pokorný2014-09-051-2/+9
| | | | | | | | ... by automatically instructing underlying layer to obtain symbols necessary for successful resolution of plugins in higher level (commands - filters - formats). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* plugin_registry: s/_init_handle_plugins/_init_pluginsJan Pokorný2014-09-051-4/+5
| | | | | | + add a note that we could somehow initialize plugins earlier Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Solve a "read-only dict as API" question once foreverJan Pokorný2014-09-041-10/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command{,_manager}: command responsible for resolving selfJan Pokorný2014-09-021-47/+27
| | | | | | | | | ... against the passed filters; The convention is that when the Command{,Alias} cannot be resolved successfully, None object is returned from constructing the object. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: pretty_cmds: sort the commands by nameJan Pokorný2014-09-021-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: add (dummy) infloop guards for recursive aliasesJan Pokorný2014-08-291-1/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: allow for recursive aliases (w/o guards)Jan Pokorný2014-08-291-2/+9
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: add `implicit` as a shortcut constructorJan Pokorný2014-08-261-0/+14
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Introduce an explicit notion about target system+distroJan Pokorný2014-05-221-4/+4
| | | | | | | ...which is, in an unified way, used for both deciding alias targets and for decisions within commands/filters. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Refactor: separate set_logging func in utils_progJan Pokorný2014-05-191-15/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_prog: new program-specific unit incl. some moves from utilsJan Pokorný2014-05-191-3/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Relicence GPLv2 -> GPLv2+Jan Pokorný2014-04-251-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* logging: allow destination file/logfile to be specifiedJan Pokorný2014-04-041-0/+13
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: make logging work also under Python <2.7Jan Pokorný2014-04-041-1/+4
| | | | | | Follow-up of the commit a829c9b4dcd18154c4cf6057cda748fabe62d9c3. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Refactor: move functional-paradigm helpers utils -> utils_funcJan Pokorný2014-04-011-5/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* __init__ + command_manager: push wrap limit 70 -> 76 charsJan Pokorný2014-03-061-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command: integrate cmd alias support (incl. help screen+completion)Jan Pokorný2014-03-061-15/+60
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: remove wasteful line splitJan Pokorný2014-03-061-2/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* completion: way to get bash (and perhaps others) autocompletionsJan Pokorný2014-02-261-0/+6
| | | | | | | | Currently it provides WIP standalone bash completion, but should be fairly easy to implement support for, e.g. bash-completion dependent version, zsh-specific one, etc. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command-related: postpone creating Option instancesJan Pokorný2014-02-261-2/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command: parser_desc_opts can be propertyJan Pokorný2014-02-131-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Move base exceptions and exit codes to separate error.pyJan Pokorný2014-01-271-3/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Finalize basic command manager's responsibilitiesJan Pokorný2014-01-241-1/+4
| | | | | | | ...pushing the generic processing to be implemented further to the command itself. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: removed stale commented out codeJan Pokorný2014-01-241-3/+0
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Finalize basic command-line handlingJan Pokorný2014-01-231-39/+53
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* *_manager: s/_handle_plugins/_init_handle_plugins/ + change guardJan Pokorný2014-01-211-1/+1
| | | | | | ... making a need to subclass PluginManager explicit Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: adjust help(): docstring + cosmeticsJan Pokorný2014-01-201-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command: integrate per-command options parsingJan Pokorný2014-01-201-6/+13
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: make handle help (at least)Jan Pokorný2014-01-201-9/+41
| | | | | | | It expects being passed command-line arguments unwrapped from initial list, so adjust main.py respectively. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: initial plugins registration (ala filter_manager)Jan Pokorný2014-01-201-4/+35
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* *Manager: make common (abstract) base PluginManagerJan Pokorný2014-01-171-4/+17
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Batch header unificationJan Pokorný2013-11-181-2/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Initial commitJan Pokorný2013-11-181-0/+14
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>