refactor(functions): consolidate 198 duplicate color declarations into one helper #131
@@ -38,13 +38,7 @@ function __config_settings_draw
|
|||||||
set -l cur_scope $argv[2]
|
set -l cur_scope $argv[2]
|
||||||
set -l vars $argv[3..]
|
set -l vars $argv[3..]
|
||||||
|
|
||||||
set -l c_ok (set_color green)
|
__fish_palette
|
||||||
set -l c_err (set_color red)
|
|
||||||
set -l c_dim (set_color brblack)
|
|
||||||
set -l c_sel (set_color --bold magenta)
|
|
||||||
set -l c_hi (set_color --bold white)
|
|
||||||
set -l c_head (set_color --bold cyan)
|
|
||||||
set -l c_reset (set_color normal)
|
|
||||||
|
|
||||||
set -l labels Aliases Auto-exec Overrides Integrations Logging Greeting Master
|
set -l labels Aliases Auto-exec Overrides Integrations Logging Greeting Master
|
||||||
|
|
||||||
|
|||||||
@@ -41,12 +41,7 @@ function __config_settings_draw_subcat
|
|||||||
set -l cur_scope $argv[2]
|
set -l cur_scope $argv[2]
|
||||||
set -l category_var $argv[3]
|
set -l category_var $argv[3]
|
||||||
|
|
||||||
set -l c_ok (set_color green)
|
__fish_palette
|
||||||
set -l c_err (set_color red)
|
|
||||||
set -l c_dim (set_color brblack)
|
|
||||||
set -l c_sel (set_color --bold magenta)
|
|
||||||
set -l c_head (set_color --bold cyan)
|
|
||||||
set -l c_reset (set_color normal)
|
|
||||||
|
|
||||||
set -l rows (__config_settings_subcats $category_var)
|
set -l rows (__config_settings_subcats $category_var)
|
||||||
set -l n (count $rows)
|
set -l n (count $rows)
|
||||||
|
|||||||
@@ -33,12 +33,7 @@ function __config_settings_draw_value
|
|||||||
set -l edit_mode $argv[3]
|
set -l edit_mode $argv[3]
|
||||||
set -l edit_buf $argv[4]
|
set -l edit_buf $argv[4]
|
||||||
|
|
||||||
set -l c_ok (set_color green)
|
__fish_palette
|
||||||
set -l c_err (set_color red)
|
|
||||||
set -l c_dim (set_color brblack)
|
|
||||||
set -l c_sel (set_color --bold magenta)
|
|
||||||
set -l c_head (set_color --bold cyan)
|
|
||||||
set -l c_reset (set_color normal)
|
|
||||||
|
|
||||||
# ── Page row metadata (parallel lists) ────────────────────────────────
|
# ── Page row metadata (parallel lists) ────────────────────────────────
|
||||||
set -l title
|
set -l title
|
||||||
|
|||||||
@@ -27,8 +27,7 @@ function __config_settings_pagetab
|
|||||||
set -l active $argv[1]
|
set -l active $argv[1]
|
||||||
set -l iw $argv[2]
|
set -l iw $argv[2]
|
||||||
|
|
||||||
set -l c_hi (set_color --bold white)
|
__fish_palette
|
||||||
set -l c_reset (set_color normal)
|
|
||||||
set -l names Universal Session Sponge Paths
|
set -l names Universal Session Sponge Paths
|
||||||
|
|
||||||
set -l strip ' '
|
set -l strip ' '
|
||||||
|
|||||||
@@ -69,12 +69,7 @@
|
|||||||
# EXAMPLE
|
# EXAMPLE
|
||||||
# config-settings
|
# config-settings
|
||||||
function config-settings --description 'Interactive TUI for managing fish config settings'
|
function config-settings --description 'Interactive TUI for managing fish config settings'
|
||||||
set -l c_head (set_color --bold cyan)
|
__fish_palette
|
||||||
set -l c_cmd (set_color --bold)
|
|
||||||
set -l c_flag (set_color yellow)
|
|
||||||
set -l c_dim (set_color brblack)
|
|
||||||
set -l c_err (set_color red)
|
|
||||||
set -l c_reset (set_color normal)
|
|
||||||
|
|
||||||
# ── Argument parsing ──────────────────────────────────
|
# ── Argument parsing ──────────────────────────────────
|
||||||
for arg in $argv
|
for arg in $argv
|
||||||
|
|||||||
Reference in New Issue
Block a user