summaryrefslogtreecommitdiffstats
path: root/main.py
Commit message (Collapse)AuthorAgeFilesLines
* main: better support for short/long "report bugs" linkJan Pokorný2016-02-011-3/+8
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: display "report bugs" reference infoJan Pokorný2016-02-011-15/+29
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main+command_manager: allow symlink shortcuts to subcommandsJan Pokorný2015-06-191-6/+11
| | | | | | | | # 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>
* main: s/(expert)/(Advanced)/ per Pacemaker's exampleJan Pokorný2015-06-191-1/+1
| | | | | | See, e.g., "cibadmin -?". Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: prepend "(expert) " to options of that sortJan Pokorný2015-06-191-0/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: massage help messages a bitJan Pokorný2015-04-151-7/+9
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: extra --dist handling callbackJan Pokorný2015-04-081-1/+31
| | | | | | | | | Q: performing the check upon option parsing means this check is not performed for both the default value and when clufter used as a lib A: mocking some arguments to the callback will make it universal (alternatively, refactorization, etc.) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: enable the option-handling callbacks to be verboseJan Pokorný2015-04-081-0/+2
| | | | | | (preparation work) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: normalize "sys" option value to lowercaseJan Pokorný2015-04-081-5/+11
| | | | | | | (headbang: this is what the conversion templates already rely upon, i.e., on "linux", not "Linux", which is what platform.system returns) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* __init__/main: make --version more akin to e.g., coreutilsJan Pokorný2015-01-141-4/+4
| | | | | | | This is so as to make it better parsable for help2man utility (with the aim to provide auto-generated man page). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: make the --version detail depend on loglevelJan Pokorný2015-01-141-1/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: tweak for better utilization of pretty_cmdsJan Pokorný2015-01-091-2/+6
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: reorder some options in help msg, --dist is non-expertJan Pokorný2015-01-091-32/+31
| | | | | | | ...as it is anticipated it may be quite frequented (conversion executed on the old machine/distro) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: fix issue with -H switch not expanding %defaultJan Pokorný2015-01-091-0/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Integrate FancyOutput helper classJan Pokorný2014-12-111-1/+10
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Extend external plugins support: user provided dirsJan Pokorný2014-11-241-1/+8
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Add support for external plugins (located in ext-plugins subdir)Jan Pokorný2014-11-241-1/+7
| | | | | | | Alternatively, in development mode, it is useful to override it using {PREFIX}_EXTPLUGINS env. variable. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main + more: introduce concept of "expert" cmd switchesJan Pokorný2014-11-141-11/+55
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: state the substitution-in-the-file-spec feature in helpJan Pokorný2014-10-081-0/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: unify "technical reference" quote styleJan Pokorný2014-10-081-1/+1
| | | | 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>
* Solve a "read-only dict as API" question once foreverJan Pokorný2014-09-041-4/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main + tests/command_manager: cleanup/cosmeticsJan Pokorný2014-08-261-3/+1
| | | | | | Mainly a follow-up of commit b23cc121c3d7866dea8b559e08142d1dc229fb9e. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: add `implicit` as a shortcut constructorJan Pokorný2014-08-261-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: avoid using programmer's expression needlesslyJan Pokorný2014-06-171-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Add "quiet" general parameter and make XMLFilter honor itJan Pokorný2014-05-261-0/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Introduce an explicit notion about target system+distroJan Pokorný2014-05-221-2/+18
| | | | | | | ...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>
* main: make style/PEP-8 checker happyJan Pokorný2014-05-191-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Refactor: separate set_logging func in utils_progJan Pokorný2014-05-191-4/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_prog: new program-specific unit incl. some moves from utilsJan Pokorný2014-05-191-1/+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-1/+8
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: make logging work also under Python <2.7Jan Pokorný2014-04-031-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: logging.captureWarnings not present until Python 2.7Jan Pokorný2014-04-031-1/+5
| | | | | | cf. http://stackoverflow.com/questions/7627075 Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format/main: start using warnings standard moduleJan Pokorný2014-04-011-0/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: in fact "@" magic file have more trailing digitsJan Pokorný2014-03-271-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: allow for non-linear piping using @DIGIT notationJan Pokorný2014-03-201-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: accompany "version" output with Python runtime infoJan Pokorný2014-03-131-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: dash++Jan Pokorný2014-03-071-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: extend hint about getting per-command helpJan Pokorný2014-03-071-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: '-' file specification on output means stdout as usualJan Pokorný2014-03-071-7/+8
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command: integrate cmd alias support (incl. help screen+completion)Jan Pokorný2014-03-061-3/+8
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: allow to pass also raw description (cmd alias related)Jan Pokorný2014-03-061-8/+5
| | | | | | This also removes formatting kludge out of place. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: adjust help messagesJan Pokorný2014-02-261-3/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* completion: way to get bash (and perhaps others) autocompletionsJan Pokorný2014-02-261-1/+8
| | | | | | | | 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-41/+51
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Allow more convenient way of specifying command parametersJan Pokorný2014-02-191-2/+9
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Move base exceptions and exit codes to separate error.pyJan Pokorný2014-01-271-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Finalize basic command-line handlingJan Pokorný2014-01-231-12/+159
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_manager: make handle help (at least)Jan Pokorný2014-01-201-1/+1
| | | | | | | It expects being passed command-line arguments unwrapped from initial list, so adjust main.py respectively. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>