refactor: use __fish_palette in small utility functions (1/2)
37 duplicated declarations replaced by 8 calls. Output strings untouched; byte-identical across 29 harness cases.
This commit is contained in:
+1
-6
@@ -45,12 +45,7 @@
|
||||
# edit --editor=code --clipboard
|
||||
# edit --text="hello world"
|
||||
function edit --description 'Open files in a terminal or GUI editor with fallbacks'
|
||||
set -l c_head (set_color --bold cyan)
|
||||
set -l c_cmd (set_color --bold)
|
||||
set -l c_flag (set_color yellow)
|
||||
set -l c_err (set_color red)
|
||||
set -l c_dim (set_color brblack)
|
||||
set -l c_reset (set_color normal)
|
||||
__fish_palette
|
||||
|
||||
# Opinionated guard (C1): fall back to the legacy bare-editor behavior.
|
||||
if not __fish_config_op_enabled (status current-function)
|
||||
|
||||
Reference in New Issue
Block a user