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.
This commit is contained in:
ridiculousfish
2021-02-15 10:39:08 -08:00
parent 65a760528a
commit c35535dee7
2 changed files with 4 additions and 1 deletions

View File

@@ -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())