From d9bf53c6e563d22072bf2e18e8d6bc0027661709 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 20 Aug 2014 19:07:35 -0700 Subject: [PATCH] Show a non-zero status in the fish_config prompt When selecting a prompt with fish_config, render the prompt with a non-zero status so the user knows what it looks like. --- share/tools/web_config/webconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 9e0b9ac00..d7400f78f 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -618,13 +618,13 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_get_current_prompt(self): # Return the current prompt prompt_func, err = run_fish_cmd('functions fish_prompt') - result = self.do_get_prompt('builtin cd "' + initial_wd + '" ; fish_prompt', prompt_func.strip(), {'name': 'Current'}) + result = self.do_get_prompt('builtin cd "' + initial_wd + '" ; false ; fish_prompt', prompt_func.strip(), {'name': 'Current'}) return result def do_get_sample_prompt(self, text, extras_dict): # Return the prompt you get from the given text # extras_dict is a dictionary whose values get merged in - cmd = text + "\n cd \"" + initial_wd + "\" \n fish_prompt\n" + cmd = text + "\n builtin cd \"" + initial_wd + "\" \n false \n fish_prompt\n" return self.do_get_prompt(cmd, text.strip(), extras_dict) def parse_one_sample_prompt_hash(self, line, result_dict):