diff --git a/share/tools/web_config/js/controllers.js b/share/tools/web_config/js/controllers.js index 8cf9c80c5..a2d35d58e 100644 --- a/share/tools/web_config/js/controllers.js +++ b/share/tools/web_config/js/controllers.js @@ -99,10 +99,36 @@ controllers.controller("colorsController", function($scope, $http) { } $scope.setTheme = function() { - var settingNames = ["autosuggestion", "command", "param", "redirection", "comment", "error", "quote", "end"]; + var settingNames = ["normal", + "command", + "quote", + "redirection", + "end", + "error", + "param", + "comment", + "match", + "selection", + "search_match", + "history_current", + "operator", + "escape", + "cwd", + "cwd_root", + "valid_path", + "autosuggestion", + "user", + "host", + "cancel" + ]; var remaining = settingNames.length; - for (name in settingNames) { - var postData = "what=" + settingNames[name] + "&color=" + $scope.selectedColorScheme[settingNames[name]] + "&background_color=&bold=&underline="; + for (name of settingNames) { + // Skip colors undefined in the current theme + if (!$scope.selectedColorScheme[name]) { + remaining -= 1; + continue; + } + var postData = "what=" + name + "&color=" + $scope.selectedColorScheme[name] + "&background_color=&bold=&underline="; $http.post("set_color/", postData, { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) { if (status == 200) { remaining -= 1; diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 937838980..39a830de1 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -573,6 +573,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): 'param', 'comment', 'match', + 'selection', 'search_match', 'operator', 'escape', @@ -580,6 +581,9 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): 'redirection', 'valid_path', 'autosuggestion' + 'user', + 'host', + 'cancel' ]) # Here are our color descriptions @@ -593,6 +597,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): 'param': 'Command parameters', 'comment': 'Comments start with #', 'match': 'Matching parenthesis', + 'selection': 'Selected text', 'search_match': 'History searching', 'history_current': 'Directory history', 'operator': 'Like * and ~', @@ -600,7 +605,10 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): 'cwd': 'Current directory', 'cwd_root': 'cwd for root user', 'valid_path': 'Valid paths', - 'autosuggestion': 'Suggested completion' + 'autosuggestion': 'Suggested completion', + 'user': 'Username in the prompt', + 'host': 'Hostname in the prompt', + 'cancel': 'The ^C cancel indicator' } out, err = run_fish_cmd('set -L')