[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/release] fix: readline buggy with a color prompt
commit e27909a69220557611c0cb8a8e98889fe64433c2
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Tue Sep 13 08:42:56 2011 -0700
fix: readline buggy with a color prompt
When providing a color prompt and history completion via the readline module
the prompt can be screwed up by cycling to a command longer than the
non-displayed length of the prompt string. Unfortunatley I'm not finding a
workaround so removing formatting from the prompt. For more information see:
http://bugs.python.org/issue12972
---
src/util/torInterpretor.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py
index d6f9340..fc217f3 100644
--- a/src/util/torInterpretor.py
+++ b/src/util/torInterpretor.py
@@ -492,7 +492,12 @@ class ControlInterpretor:
return (inputLines, outputLines)
def prompt():
- prompt = format(">>> ", Color.GREEN, Attr.BOLD)
+ # Cycling history via the readline module with up/down is buggy with a color
+ # prompt. For more information see:
+ # http://bugs.python.org/issue12972
+ #prompt = format(">>> ", Color.GREEN, Attr.BOLD)
+
+ prompt = ">>> "
input = ""
# sets up tab autocompetion
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits