summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug.hellmann@dreamhost.com>2012-04-29 15:05:45 -0400
committerDoug Hellmann <doug.hellmann@dreamhost.com>2012-04-29 15:05:45 -0400
commit2b3f9b1fa84fcc496e4bf0762a67a7d6cce1b287 (patch)
treec092cf23c8f480fa7664139dc743b61a9c8160cb
parent7e8e66adebfb2bc33da6f074abc54e9bb4fcff1e (diff)
downloadcliff-tablib-2b3f9b1fa84fcc496e4bf0762a67a7d6cce1b287.tar.gz
let the interactive app set its own prompt
-rw-r--r--cliff/app.py1
-rw-r--r--cliff/interactive.py1
2 files changed, 1 insertions, 1 deletions
diff --git a/cliff/app.py b/cliff/app.py
index 3be4d60..d1ddf84 100644
--- a/cliff/app.py
+++ b/cliff/app.py
@@ -177,7 +177,6 @@ class App(object):
def interact(self):
self.interactive_mode = True
interpreter = self.interactive_app_factory(self, self.command_manager, self.stdin, self.stdout)
- interpreter.prompt = '(%s) ' % self.NAME
interpreter.cmdloop()
return 0
diff --git a/cliff/interactive.py b/cliff/interactive.py
index 493235c..2543b20 100644
--- a/cliff/interactive.py
+++ b/cliff/interactive.py
@@ -33,6 +33,7 @@ class InteractiveApp(cmd2.Cmd):
def __init__(self, parent_app, command_manager, stdin, stdout):
self.parent_app = parent_app
+ self.prompt = '(%s) ' % parent_app.NAME
self.command_manager = command_manager
cmd2.Cmd.__init__(self, 'tab', stdin=stdin, stdout=stdout)