# HG changeset patch # User catherine.devlin@gmail.com # Date 1284737556 14400 # Node ID 50acba85cf9ef14b1ca489846fc065da86671aaf # Parent e60e2c15f026a0bc9d55be8875db700756191bda no xclip >>> output got lost diff -r e60e2c15f026 -r 50acba85cf9e cmd2.py --- a/cmd2.py Thu Sep 16 07:38:26 2010 -0400 +++ b/cmd2.py Fri Sep 17 11:32:36 2010 -0400 @@ -787,6 +787,9 @@ self.redirect = subprocess.Popen(statement.parsed.pipeTo, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE) sys.stdout = self.stdout = self.redirect.stdin elif statement.parsed.output: + if (not statement.parsed.outputTo) and (not can_clip): + self.perror('Cannot redirect to paste buffer; install ``xclip`` and re-run to enable') + return self.kept_state = Statekeeper(self, ('stdout',)) self.kept_sys = Statekeeper(sys, ('stdout',)) if statement.parsed.outputTo: