Add _tide_fish_colorize

This commit is contained in:
Ilan Cosman 2023-10-03 21:01:12 -07:00
parent d9861ae730
commit 7c06ae523a
3 changed files with 11 additions and 8 deletions

View File

@ -11,7 +11,7 @@ function _tide_init_install --on-event _tide_init_install
if contains ilancosman/tide (string lower $_fisher_plugins)
set_color bryellow
echo "ilancosman/tide is a development branch. Please install from a release tag:"
echo -ns "fisher install ilancosman/tide@v5" | fish_indent --ansi
_tide_fish_colorize "fisher install ilancosman/tide@v5"
sleep 3
end
@ -19,7 +19,7 @@ function _tide_init_install --on-event _tide_init_install
case y ye yes ''
tide configure
case '*'
echo -s \n 'Run ' (echo -ns "tide configure" | fish_indent --ansi) ' to customize your prompt.'
echo -s \n 'Run ' (_tide_fish_colorize "tide configure") ' to customize your prompt.'
end
end
end
@ -29,7 +29,7 @@ function _tide_init_update --on-event _tide_init_update
if contains ilancosman/tide (string lower $_fisher_plugins)
set_color bryellow
echo "ilancosman/tide is a development branch. Please install from a release tag:"
echo -ns "fisher install ilancosman/tide@v5" | fish_indent --ansi
_tide_fish_colorize "fisher install ilancosman/tide@v5"
sleep 3
end
end

View File

@ -0,0 +1,7 @@
function _tide_fish_colorize
if command -q fish_indent
echo -ns "$argv" | fish_indent --ansi
else
echo -ns "$argv"
end
end

View File

@ -42,9 +42,5 @@ function _tide_finish
end
function _tide_print_configure_current_options
if command -q fish_indent
printf %s\n "tide configure --auto $_tide_configure_current_options" | fish_indent --ansi
else
printf %s\n "tide configure --auto $_tide_configure_current_options"
end
_tide_fish_colorize "tide configure --auto $_tide_configure_current_options"
end