diff --git a/conf.d/_tide_init.fish b/conf.d/_tide_init.fish index 939f17c..a8fce73 100644 --- a/conf.d/_tide_init.fish +++ b/conf.d/_tide_init.fish @@ -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 diff --git a/functions/_tide_fish_colorize.fish b/functions/_tide_fish_colorize.fish new file mode 100644 index 0000000..f79b188 --- /dev/null +++ b/functions/_tide_fish_colorize.fish @@ -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 diff --git a/functions/tide/configure/choices/all/finish.fish b/functions/tide/configure/choices/all/finish.fish index 06a8857..f670b1e 100644 --- a/functions/tide/configure/choices/all/finish.fish +++ b/functions/tide/configure/choices/all/finish.fish @@ -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