Skip to content

Fish shell interactive use #14

@edouard-lopez

Description

@edouard-lopez

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions