Oh My Fish Documentation
Thanks for taking the time to read this guide! Oh My Fish is an open initiative and everyone is welcome to contribute!
Feel free to open an issue for bug reports and discussing ideas.
When reporting bugs be sure to always fill the checklist below with data from your environment to help us debug your issue:
- Operating System: Arch Linux
- Fish Version: 2.3 (get using
fish --version
) - Oh My Fish Version: 2 (get using
omf --version
) - Git version: 1.9.5 (get using
git --version
)
When you have a new feature or large change in mind, please open a new issue with your suggestion to discuss the idea together.
This is the repository for the core Oh My Fish framework and bootstrap installer.
If your issue is related to a specific package, we still may be able to help, but consider visiting that package's issue tracker first.
- Use present tense: "add awesome-package", not "added ..."
- Use preceding subsystem when applicable: "registry: add theme foobar"
- 50 characters or less for the first line of your commit
- Use of emoji is free
Different from Fish's code style, Oh My Fish uses 2 spaces for indentation. As fish language is very clean it's possible to use 2 spaces without making hard work with the code. Here goes some other styles we are using:
When using and
/ or
statements be sure to always break and indent.
set -q VAR
or set -g VAR 42
Use named arguments -a
:
function greet -a message
echo "$message"
end
Use -d
description fields:
function greet -a message -d "Display a greeting message"
echo "$message"
end
In order to avoid name collisions, use a prefix based on the name of your package. For example, if you are writing a ninja
package, use ninja.function_name
.
fish
does not have private functions, so in order to avoid polluting the global namespace you have a few options:
-
Use double underscore before your function name. For example, if you are writing a
ninja
package using__ninja.function_name
. -
Delete the function before returning using
functions -e function_name
function public_func function private_func # ... functions -e private_func end end