Fix prompt updates to show the last set prompt variable

git-svn-id: file:///home/svn/framework3/trunk@13291 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
David Rude 2011-07-22 01:49:29 +00:00
parent e77ad05910
commit a54b8c26c3
2 changed files with 7 additions and 3 deletions

View File

@ -224,7 +224,9 @@ class Core
driver.destack_dispatcher
# Restore the prompt
driver.update_prompt('')
prompt = framework.datastore['Prompt']
prompt_char = framework.datastore['PromptChar']
driver.update_prompt("#{prompt}", prompt_char, true)
end
end
@ -1966,7 +1968,9 @@ class Core
mod.init_ui(driver.input, driver.output)
# Update the command prompt
driver.update_prompt("#{mod.type}(%bld%red#{mod.shortname}%clr) ")
prompt = framework.datastore['Prompt']
prompt_char = framework.datastore['PromptChar']
driver.update_prompt("#{prompt} #{mod.type}(%bld%red#{mod.shortname}%clr) ", prompt_char, true)
end
#

View File

@ -244,7 +244,7 @@ module Shell
if mode
new_prompt = prompt + (new_prompt_char || prompt_char) + ' '
end
end
# Save the prompt before any substitutions
self.prompt = new_prompt