From c35535dee75c972cb6a2d2d98d4d78f0f1fd314b Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 15 Feb 2021 10:39:08 -0800 Subject: [PATCH] Do not show the history variable in fish_config The history variable may be so large that it hangs the browser, as spotted in #7714. Omit this from the variable list. --- CHANGELOG.rst | 2 +- share/tools/web_config/webconfig.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a3e51546f..831cd0a92 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -250,7 +250,7 @@ Interactive improvements - History search now flashes when it found no more results (:issue:`7362`) - fish now creates the path in the environment variable ``XDG_RUNTIME_DIR`` if it does not exist, before using it for runtime data storage (:issue:`7335`). - ``set_color --print-colors`` now also respects the bold, dim, underline, reverse, italic and background modifiers, to better show their effect (:issue:`7314`). -- The fish Web configuration tool (``fish_config``) shows prompts correctly on Termux for Android (:issue:`7298`) and detects Windows Services for Linux 2 properly (:issue:`7027`). It also starts the browser in another thread, avoiding hangs in some circumstances, especially with firefox developer edition (:issue:`7158`). +- The fish Web configuration tool (``fish_config``) shows prompts correctly on Termux for Android (:issue:`7298`) and detects Windows Services for Linux 2 properly (:issue:`7027`). It no longer shows the ``history`` variable as it may be too large (one can use the History tab instead). It also starts the browser in another thread, avoiding hangs in some circumstances, especially with firefox developer edition (:issue:`7158`). - ``funcsave`` has a new ``--directory`` option to specify the location of the saved function (:issue:`7041`). - ``help`` works properly on MSYS2 (:issue:`7113`) and only uses cmd.exe if running on WSL (:issue:`6797`). - Resuming a piped job by its number, like ``fg %1``, works correctly (:issue:`7406`). Resumed jobs show the correct title in the terminal emulator (:issue:`7444`). diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 01c7b7aaf..25b3aedc7 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -973,6 +973,9 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): if name in vars: vars[name].exported = True + # Do not return history as a variable, it may be so large the browser hangs. + vars.pop('history', None) + return [ vars[key].get_json_obj() for key in sorted(vars.keys(), key=lambda x: x.lower())