2013-05-17 21:05:41 +08:00
# Oh My Fish!
### Why?
Developing on a shell should be a pleasure. Our goal is to help developers that don't want to spend time configuring their own computer to spend time doing what they want.
### How?
With the power of our community, we take the already awesome [fish shell][fish] to another level by creating simple-to-use plugins and themes.
[fish]: http://fishshell.com/
### What?
2013-05-19 11:48:11 +08:00
Oh-my-fish is a user-friendly framework for managing your fish-shell configuration. It includes optional plugins (brew, git, rails, python, node, etc) and themes.
2013-05-17 21:05:41 +08:00
## Installation
Oh-my-fish is built for recent versions of the fish shell, namely "fish 2.0".
2013-05-17 23:04:10 +08:00
curl -L https://github.com/bpinto/oh-my-fish/raw/master/tools/install.sh | sh
2013-05-17 21:05:41 +08:00
If you want to install it manually, keep reading.
## Usage
Enabling a new plugin or theme is as easy as it should be. Open your fish configuration file
`~/.config/fish/config.fish` and specify the theme and the plugins you want to use.
2013-05-19 11:48:11 +08:00
As an example, to enable rails and git plugins add this line `set fish_plugins git rails`
2013-05-17 21:05:41 +08:00
to your configuration file.
## Customization
If you have many functions which go well together, you can create custom plugin in the `custom/plugins/PLUGIN_NAME`
directory and add to it as many functions as you want.
If you would like to override the functionality of a plugin distributed with oh-my-fish,
create a plugin of the same name in the `custom/plugins/` directory and it will be loaded
instead of the one shipped with oh-my-fish.
If you just want to override any of the default behavior or add some environment variables,
just add a new file (ending in .load) into the `custom/` directory.
## Send us your theme!
2013-08-07 05:01:08 +08:00
I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the [themes ](themes/ ) directory.
2013-05-17 21:05:41 +08:00
2013-08-27 09:46:51 +08:00
## Integrating oh-my-fish themes with fish_config
Fish provides fish_config, a web portal where you can modify some configurations, including changing your fish_prompt. By default, fish_config comes with a series of prepackaged themes. Running copy_prompts.fish installed with oh-my-fish will integrate oh-my-fish's provided themes with fish_config and allow you to choose a custom theme as your prompt.
2013-05-17 21:05:41 +08:00
## Switching to fish
If you wish to use fish as your default shell, use the following command:
2013-05-17 21:10:34 +08:00
grep -q '^/usr/local/bin/fish$' /etc/shells; or echo '/usr/local/bin/fish' | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish
2013-05-17 21:05:41 +08:00
chsh will prompt you for your password, and change your default shell.
To switch your default shell back, you can run:
2013-05-17 21:10:34 +08:00
chsh -s /bin/bash
2013-05-17 21:05:41 +08:00
Substitute /bin/bash with /bin/tcsh or /bin/zsh as appropriate.
### Manual installation
1. Clone the repository
2013-05-17 21:10:34 +08:00
```
2013-05-17 21:05:41 +08:00
git clone git://github.com/bpinto/oh-my-fish.git ~/.oh-my-fish
2013-05-17 21:10:34 +08:00
```
2013-05-17 21:05:41 +08:00
2. Create a new fish config by copying the fish template we've provided.
2013-05-17 21:10:34 +08:00
```
2013-05-17 21:05:41 +08:00
cp ~/.oh-my-fish/templates/config.fish ~/.config/fish/config.fish
2013-05-17 21:10:34 +08:00
```
2013-05-17 21:05:41 +08:00
3. Start / restart fish (just open a new terminal)
2013-06-21 10:49:24 +08:00
### Uninstall
rm -rf ~/.oh-my-fish
2013-05-17 21:05:41 +08:00
2013-05-17 21:14:07 +08:00
###. Oh My ZSH
2013-05-17 21:05:41 +08:00
2013-05-17 21:10:34 +08:00
This project is heavily inspired by [oh-my-zsh][oh-my-zsh]
2013-05-17 21:05:41 +08:00
2013-05-17 21:10:34 +08:00
[oh-my-zsh]: https://github.com/robbyrussell/oh-my-zsh/