mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03:00
webconfig: Update color lists
This adds the color variables from the docs to both the python script and the js controller. Among others, this includes "search_match", i.e. "fish_color_search_match". It still does not include the pager colors because the variable names wouldn't match.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user