ColorEchoForShell
ColorEchoForShell copied to clipboard
Fish shell interactive use
trafficstars
Not really an issue, just a snippet to use interactively as the dist file contains multiple function declarations, we can't use native Fish autoloading mechanism and need to extract the functions
Fetch the dist script for fish
curl --location --output $__fish_config_dir/functions/ColorEcho.fish https://raw.githubusercontent.com/PeterDaveHello/ColorEchoForShell/master/dist/ColorEcho.fish
Extract the functions, one per file to leverage autoloading
functions \
| grep echo. \
| while read line; \
funcsave $line --directory $__fish_config_dir/functions/echo-colored/; \
end
Tell Fish where we extracted the functions, so he can look there too
echo 'set --append fish_function_path $HOME/.config/fish/functions/echo-colored' >> $__fish_config_dir/config.fish
Preview
Open a new shell and try it
https://github.com/PeterDaveHello/ColorEchoForShell/assets/1212392/7ef46a61-566a-473d-9076-b9a81795f911