From 1f1cd87e87f4e43d3fa32ae7d2cdbe71f36a08e6 Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Mon, 10 Oct 2011 18:42:44 +0000 Subject: [PATCH] Fixes #5660. update_prompt('') is now equivalent to update_prompt(nil), which avoids the prompt stacking problem when setting an empty prompt. git-svn-id: file:///home/svn/framework3/trunk@13855 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/ui/text/shell.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/ui/text/shell.rb b/lib/rex/ui/text/shell.rb index 7628eed926..96d2ac1221 100644 --- a/lib/rex/ui/text/shell.rb +++ b/lib/rex/ui/text/shell.rb @@ -237,7 +237,7 @@ module Shell # mode - append or not to append - false = append true = make a new prompt def update_prompt(prompt = nil, new_prompt_char = nil, mode = false) if (self.input) - if prompt + if prompt and prompt.length > 1 new_prompt = self.init_prompt + ' ' + prompt + prompt_char + ' ' else new_prompt = self.prompt || ''