summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2020-04-07 12:36:59 +0530
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2020-04-07 12:36:59 +0530
commit534c4759fc27e7ef8e1d477b4909485d2ac4bf91 (patch)
treeab9db87ac41191aa141449993c4bb28b4a1c30ae
parentd768df6942385bb1b3447b9950531b40f35ccfed (diff)
downloadtargetcli-534c4759fc27e7ef8e1d477b4909485d2ac4bf91.tar.gz
daemon-interactive: do not allow clearing the prompt
Typing somthing and then hitting backspace multiple-times would clear the prompt previously. This patch do not let backspace clear the prompt msg. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
-rwxr-xr-xscripts/targetcli3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/targetcli b/scripts/targetcli
index 1c2046f..f00bffc 100755
--- a/scripts/targetcli
+++ b/scripts/targetcli
@@ -224,8 +224,7 @@ def switch_to_daemon(shell, interactive):
inputs = []
real_exit=False
while True:
- shell.con.raw_write("%s> " %prompt_path)
- command = six.moves.input()
+ command = six.moves.input("%s> " %prompt_path)
if command.lower() == "exit":
real_exit=True
elif not command: