-
Derek Stavis authored6edd6688
Packages.md 2.60 KiB
Creating
To learn package creation let's create a new package that will provide a hello_world
command for your shell. Package names may only contain lowercase letters and hyphens to separate words.
Oh My Fish can scaffold a package structure for you. Use the command omf new
:
$ omf new pkg hello_world
Use
omf new theme my_theme_name
for themes.
The utily changes the current directory to the newly created package:
$ ls -l
README.md
hello_world.fish
completions/hello_world.fish
Always describe how your package works in the README.md
. Also read more about auto completion and also take care to provide it for your utilities when applicable.
hello_world.fish
defines a single function:
function hello_world -d "Prints hello world"
echo "Hello World!"
end