Skip to content

Commit d023377

Browse files
committed
Corrected what prompt variable was being used
1 parent f215e5e commit d023377

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd2/cmd2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ def pseudo_raw_input(self, prompt: str) -> str:
21112111
else:
21122112
line = input()
21132113
if self.echo:
2114-
sys.stdout.write('{}{}\n'.format(self.prompt, line))
2114+
sys.stdout.write('{}{}\n'.format(prompt, line))
21152115
except EOFError:
21162116
line = 'eof'
21172117
finally:
@@ -2121,7 +2121,7 @@ def pseudo_raw_input(self, prompt: str) -> str:
21212121
else:
21222122
if self.stdin.isatty():
21232123
# on a tty, print the prompt first, then read the line
2124-
self.poutput(self.prompt, end='')
2124+
self.poutput(prompt, end='')
21252125
self.stdout.flush()
21262126
line = self.stdin.readline()
21272127
if len(line) == 0:
@@ -2134,7 +2134,7 @@ def pseudo_raw_input(self, prompt: str) -> str:
21342134
if len(line):
21352135
# we read something, output the prompt and the something
21362136
if self.echo:
2137-
self.poutput('{}{}'.format(self.prompt, line))
2137+
self.poutput('{}{}'.format(prompt, line))
21382138
else:
21392139
line = 'eof'
21402140

0 commit comments

Comments
 (0)