diff options
-rw-r--r-- | distixlib/plugins/global_settings_plugin.py | 36 | ||||
-rw-r--r-- | distixlib/plugins/show_plugin.py | 5 | ||||
-rw-r--r-- | without-tests | 1 |
3 files changed, 37 insertions, 5 deletions
diff --git a/distixlib/plugins/global_settings_plugin.py b/distixlib/plugins/global_settings_plugin.py new file mode 100644 index 0000000..de74f98 --- /dev/null +++ b/distixlib/plugins/global_settings_plugin.py @@ -0,0 +1,36 @@ +# Copyright 2014 Lars Wirzenius +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# =*= License: GPL-3+ =*= + + +import os + +import cliapp + +import distixlib + + +class GlobalSettingsPlugin(cliapp.Plugin): + + def enable(self): + self.app.settings.string( + ['ticket-id-from'], + 'read ticket id(s) from FILE, one per line, ' + 'instead of command line, for commands that take ticket ids', + metavar='FILE') + + def disable(self): + pass diff --git a/distixlib/plugins/show_plugin.py b/distixlib/plugins/show_plugin.py index b7ea79a..447d6ba 100644 --- a/distixlib/plugins/show_plugin.py +++ b/distixlib/plugins/show_plugin.py @@ -46,11 +46,6 @@ class ShowTicketPlugin(cliapp.Plugin): self.app.add_subcommand( 'show', self.show_ticket, arg_synopsis='TICKETID...') - self.app.settings.string( - ['ticket-id-from'], - 'read ticket id(s) from FILE, one per line, instead of command line', - metavar='FILE') - def disable(self): pass diff --git a/without-tests b/without-tests index a96ce4d..b0ce9d4 100644 --- a/without-tests +++ b/without-tests @@ -1,6 +1,7 @@ setup.py distixlib/app.py distixlib/__init__.py +distixlib/plugins/global_settings_plugin.py distixlib/plugins/init_plugin.py distixlib/plugins/list_plugin.py distixlib/plugins/metadata_manipulation_plugin.py |