webconfig: Allow setting a variable to empty

This commit is contained in:
Fabian Homborg 2021-12-13 20:20:39 +01:00
parent b98f71c16f
commit c75ecf9b03

View File

@ -1110,7 +1110,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
"Sets a color for a fish color name, like 'autosuggestion'"
if not name:
raise ValueError
if not color:
if not color and not color == "":
color = "normal"
varname = "fish_color_" + name
# If the name already starts with "fish_", use it as the varname