Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fish shell interactive use #14

Open
edouard-lopez opened this issue Nov 9, 2023 · 1 comment
Open

Fish shell interactive use #14

edouard-lopez opened this issue Nov 9, 2023 · 1 comment

Comments

@edouard-lopez
Copy link

edouard-lopez commented Nov 9, 2023

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

echo-colored.webm.mov
@PeterDaveHello
Copy link
Owner

Hi @edouard-lopez,

Thank you for the information. Do you also have a suggestion about how to deal with it? I'm not familiar with fish shell, but I would like to see what we can do about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants