refactor: use __fish_palette in small utility functions (2/2)
25 duplicated declarations replaced by 7 calls. Completes the 33 structural conversions: 167 declarations removed, 33 calls added, and --structural confirms every one of the 33 diffs is declaration removals plus inserted calls only -- no rendering text touched. functions/y.fish is the one file in the repo with no trailing newline on main; its original file ending is preserved rather than normalised.
This commit is contained in:
@@ -29,11 +29,7 @@ function spark --description 'Sparklines'
|
||||
if set --query _flag_version[1]
|
||||
echo "spark, version 1.1.0"
|
||||
else if set --query _flag_help[1]
|
||||
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_arg (set_color cyan)
|
||||
set -l c_reset (set_color normal)
|
||||
__fish_palette
|
||||
echo "$c_head""Usage:$c_reset $c_cmd""spark$c_reset $c_arg""<numbers ...>$c_reset"
|
||||
echo " stdin | $c_cmd""spark$c_reset"
|
||||
echo "$c_head""Options:$c_reset"
|
||||
|
||||
Reference in New Issue
Block a user