The Fishshell Framework
Wahoo and Oh My Fish! are now one project. See this page and FAQ to learn what's new.
About | Install | Getting Started | Advanced | Screencasts | Contributing | FAQ
Oh My Fish is an all-purpose framework for the fishshell. It looks after your configuration, themes and packages. It's lightning fast and easy to use.
We love contributions, fork and send us a PR.
curl -L git.io/omf | sh
omf help
Or download and run it yourself:
curl -L git.io/omf > install
chmod +x install
./install
Oh My Fish includes a small utility omf
to fetch and install new packages and themes.
Update framework and installed packages.
Install one or more themes or packages. To list available packages type omf theme
.
You can fetch packages by URL as well via
omf install URL
List installed packages.
To list packages available for download use
omf install
.
Apply a theme. To list available themes type omf theme
.
Remove a theme or package.
Packages subscribed to
uninstall_<pkg>
events are notified before the package is removed to allow custom cleanup of resources. See Uninstall.
Scaffold out a new package or theme.
This creates a new directory under
$OMF_CONFIG/{pkg | themes}/
with a template.
Add a new package. To add a theme use omf submit
themes/<name>
<url>
.
Make sure to send us a PR to update the registry.
Use to inspect all session variables. Useful to dump path variables like $fish_function_path
, $fish_complete_path
, $PATH
, etc.
Uninstall Oh My Fish. See uninstall for more information.
This script runs each time a new session begins, autoloading packages, themes and your config path in that order.
The config path (~/.config/omf
by default) is defined by $OMF_CONFIG
in ~/.config/fish/config.fish
. Modify this to load your own configuration, if you have any, as discussed in the FAQ.
The core library is a minimum set of basic utility functions that extend your shell.
A package name may only contain lowercase letters and hyphens to separate words.
To scaffold out a new package:
$ omf new pkg my_package
my_package/
README.md
my_package.fish
completions/my_package.fish
Use
omf new theme my_theme
for themes.
Please provide auto completion for your utilities if applicable and describe how your package works in the README.md
.
my_package.fish
defines a single function:
function my_package -d "My package"
end
Bear in mind that fish lacks a private scope so consider the following options to avoid polluting the global namespace:
- Prefix functions:
my_package_my_func
. - Using blocks.
Oh My Fish keeps a registry of packages under $OMF_PATH/db/
.
To create a new entry run:
omf submit pkg/my_package .../my_package.git
Similarly for themes use:
omf submit theme/my_theme .../my_theme.git
This will add a new entry to your local copy of the registry. Please send us a PR to update the global registry.
If you want to be notified when your package loads, declare the following function in your my_package.fish
:
function init -a path --on-event init_mypkg
end
Use this event to modify the environment, load resources, autoload functions, etc. If your package does not export any functions, you can still use this event to add functionality to your package.
Oh My Fish emits uninstall_<pkg>
events before a package is removed via omf remove <pkg>
. Subscribers can use the event to clean up custom resources, etc.
function uninstall --on-event uninstall_pkg
end
Remove any packages you wish to turn off using omf remove <package name>
. Alternatively, you can set a global env variable $OMF_IGNORE
in your ~/.config/fish/config.fish
with the packages you wish to ignore. For example:
set -g OMF_IGNORE skip this that ...
MIT © Oh My Fish 🤘