Open k4u5h1k opened 3 years ago
Thanks for this, that single-character addition does indeed fix the "disappearing prompt" problem that's been troubling me! I note that an artefact of this is that there are now two spaces ␣
after the prompt: prompt>␣␣
. A quick hack that fixes this is to remove the trailing space from line 1863 and adding it to line 1866 in the current HEAD revision on master appears to fix both problems:
def set_prompt(self):
if self.stdin == sys.stdin:
- prompt = PROMPT_COLOR + cur_dir + END_COLOR + '> '
+ prompt = PROMPT_COLOR + cur_dir + END_COLOR + '>'
if FAKE_INPUT_PROMPT:
print(prompt, end='')
- self.prompt = ''
+ self.prompt = ' '
else:
self.prompt = prompt
else:
Edit: PR #153 has the same fix for this 🤔
Yep thats my PR :)
Do I have a solution?
Yes
Details
Setting self.prompt to a single whitespace
self.prompt = ' '
instead of empty string
self.prompt = ''
in
line 1859
ofrshell/main.py
fixes the issue completely on OSX