mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
webconfig: Allow setting pager colors
This commit is contained in:
parent
a02eac5a7a
commit
be1c022861
2 changed files with 13 additions and 3 deletions
|
@ -119,7 +119,11 @@ controllers.controller("colorsController", function($scope, $http) {
|
|||
"autosuggestion",
|
||||
"user",
|
||||
"host",
|
||||
"cancel"
|
||||
"cancel",
|
||||
"fish_pager_color_completion",
|
||||
"fish_pager_color_description",
|
||||
"fish_pager_color_prefix",
|
||||
"fish_pager_color_progress"
|
||||
];
|
||||
var remaining = settingNames.length;
|
||||
for (name of settingNames) {
|
||||
|
|
|
@ -735,10 +735,16 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|||
|
||||
def do_set_color_for_variable(self, name, color, background_color, bold,
|
||||
underline):
|
||||
"Sets a color for a fish color name, like 'autosuggestion'"
|
||||
if not color:
|
||||
color = 'normal'
|
||||
"Sets a color for a fish color name, like 'autosuggestion'"
|
||||
command = 'set -U fish_color_' + name
|
||||
varname = 'fish_color' + name
|
||||
# If the name already starts with "fish_", use it as the varname
|
||||
# This is needed for 'fish_pager_color' vars.
|
||||
if name.startswith('fish_'):
|
||||
varname = name
|
||||
# TODO: Check if the varname is allowable.
|
||||
command = 'set -U ' + varname
|
||||
if color:
|
||||
command += ' ' + color
|
||||
if background_color:
|
||||
|
|
Loading…
Reference in a new issue