diff --git a/cccli/command/command.py b/cccli/command/command.py index 5cc29330e150c4809bf12f2bbc95b71916d13a63..6a934d0ebf5f1d2d61cc23de64524ca255c41ad8 100644 --- a/cccli/command/command.py +++ b/cccli/command/command.py @@ -92,9 +92,13 @@ class TqlCommand(OptionCommand): self.tdr = self.cli.tagdisplay.resolve self.tdc = self.cli.tagdisplay.color self.tdtc = self.cli.tagdisplay.titlecolor - self.add_option("--no-tagdisplay", action="callback", dest="tagdisplay", + self.add_option("--no-tagdisplay", action="callback", callback=self._cb_notagdisplay, help="No tagdisplay custom display") + self.add_option("--no-color", action="callback", + callback=self._cb_nocolor, + help="No output coloration") + def _cb_notagdisplay(self, option, opt, value, parser): '''Callback for option --no-tagdisplay''' @@ -102,6 +106,12 @@ class TqlCommand(OptionCommand): self.tdc = self.cli.tagdisplay.default_color self.tdtc = self.cli.tagdisplay.default_titlecolor + def _cb_nocolor(self, option, opt, value, parser): + '''Callback for option --no-color''' + self.tdr = lambda tagname, tagvalue: tagvalue + self.tdc = lambda tagname: "" + self.tdtc = lambda tagname: "" + def _cb_raw(self, option, opt, value, parser): '''Callback for option --raw''' self.tql_filter = ""