• Stars
    star
    10,025
  • Rank 3,290 (Top 0.07 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Fish Shell Framework

The Fishshell Framework

MIT License Fish Shell Version Build

Oh My Fish provides core infrastructure to allow you to install packages which extend or modify the look of your shell. It's fast, extensible and easy to use.

Also inย  ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡จ๐Ÿ‡ณ


Table of contents

Installation

You can get started right away with the default setup by running this in your terminal:

curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish

This will download the installer script and start the installation. Alternatively, you can download the installer and customize your install:

curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
fish install --path=~/.local/share/omf --config=~/.config/omf

You can verify the integrity of the downloaded installer by verifying the script against this checksum:

curl -sL https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install.sha256 | shasum -a 256 --check

You can also install Oh My Fish with Git or with an offline source tarball downloaded from the releases page:

# with git
$ git clone https://github.com/oh-my-fish/oh-my-fish
$ cd oh-my-fish
$ bin/install --offline
# with a tarball
$ curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install > install
$ fish install --offline=omf.tar.gz

Run install --help for a complete list of install options you can customize.

Requirements

  • fish shell, version 2.2 or later
  • git, version 1.9.5 or later

Known Issues

  • Due to a regression bug in fish 2.6 with some terminal emulators, right prompts make the shell unusable. OMF's default theme features a right prompt, so it's necessary to use an alternative theme until a fix is released. (see #541)

Getting Started

Oh My Fish includes a small utility omf to fetch and install new packages and themes.

omf update [omf] [<package>...]

Update Oh My Fish, all package repositories, and all installed packages.

  • When called without arguments, update core and all installed packages.
  • You can choose to update only the core, by running omf update omf.
  • For selective package update, list only the names of packages you wish to update. You may still include "omf" in the list to update the core as well.

omf install [<name>|<url>|<user/repo>]

Install one or more packages.

  • You can install packages directly by URL via omf install URL
  • You can install packages from a GitHub repository via omf install user/repo
  • When called without arguments, install missing packages from bundle.

omf repositories [list|add|remove]

Manage user-installed package repositories. Package repositories are where packages come from used by commands like omf install. By default the official repository is always installed and available.

omf list

List installed packages.

omf theme <theme>

Apply a theme. To list available themes, type omf theme. You can also preview available themes before installing.

omf remove <name>

Remove a theme or package. If a package was installed via user/repo, use repo for name.

Packages can use uninstall hooks, so custom cleanup of resources can be done when uninstalling it. See Uninstall for more information.

omf reload

Reload Oh My Fish and all plugins by using exec to replace current shell process with a brand new.

This command tries to be as safe as possible, mitigating side-effects caused by exec and preventing the reload in case of background processes.

omf new plugin | theme <name>

Scaffold out a new plugin or theme.

This creates a new directory under $OMF_CONFIG/{pkg | themes}/ with a template.

omf search -t|--theme / -p|--package <name>

Searches Oh My Fish's database for a given package, theme or both. It also supports fuzzy search, so if you are not sure of the name you can simply omf search simple.

omf channel

Gets or changes the update channel.

Two channels are available by default: the stable channel provides stable updates with the latest tagged version of Oh My Fish, and dev which provides the latest changes under development. The update channel currently set determines what version omf update will upgrade to.

omf doctor

Use to troubleshoot before opening an issue.

omf destroy

Uninstall Oh My Fish.

Advanced

Oh My Fish installer adds a snippet to fish's user config files (~/.config/fish/conf.d/) which calls OMF's startup code.

Notice that the scripts in that directory are sourced in the order that the filesystem sees them, and so it may be necessary to prefix your script files with ordering numbers.

For example: a_script.fish will take precedence over the omf.fish snippet. So if a_script.fish depends on plugins managed by OMF, consider renaming the script file to xx_a_script.fish.

Similarly, to make sure that a script runs before omf.fish, you may prefix it with 00_. Alternatively, ~/.config/omf/before.init.fish may be used.

Startup

Every time you open a new shell, the startup code initializes Oh My Fish installation path and the config path (~/.config/omf by default), sourcing the init.fish script afterwards, which autoloads packages, themes and your custom init files.

For more information check the FAQ.

Dotfiles

The $OMF_CONFIG directory represents the user state of Oh My Fish. It is the perfect candidate for being added to your dotfiles and/or checked out to version control. There you can find three important files:

  • theme - The current theme
  • bundle - List of currently installed packages/themes
  • channel - The channel from which OMF gets updates (stable / dev)

And you may create and customize these special files:

  • init.fish - Custom script sourced after shell start
  • before.init.fish - Custom script sourced before shell start
  • key_bindings.fish - Custom key bindings where you can use the bind command freely

Setting variables in init.fish

One of the most common startup commands used in init.fish is variables definition. Quite likely, such variables need to be available in any shell session. To achieve this, define them globally. For example:

# Golang developers might need this one
set -xg GOPATH $HOME/gocode

# Python developers otherwise
set -xg PYTHONDONTWRITEBYTECODE 1

About the bundle

Every time a package/theme is installed or removed, the bundle file is updated. You can also edit it manually and run omf install afterwards to satisfy the changes. Please note that while packages/themes added to the bundle get automatically installed, a package/theme removed from bundle isn't removed from user installation.

Older fish versions

In fish 2.2, there is no conf.d directory, so the startup code has to be placed in the fish config file (~/.config/fish/config.fish).

It's highly recommended that your custom startup commands go into init.fish file instead of ~/.config/fish/config.fish, as this allows you to keep the whole $OMF_CONFIG directory under version control.

If you need startup commands to be run before Oh My Fish begins loading plugins, place them in before.init.fish instead. If you're unsure, it is usually best to put things in init.fish.

Creating Packages

Oh My Fish uses an advanced and well defined plugin architecture to ease plugin development, including init/uninstall hooks, function and completion autoloading. See the packages documentation for more details.

More Repositories

1

theme-bobthefish

A Powerline-style, Git-aware fish theme optimized for awesome.
Shell
1,403
star
2

packages-main

Primary Oh My Fish package repository.
225
star
3

plugin-foreign-env

Run foreign bash scripts and capture exported environment variables
Shell
207
star
4

plugin-bang-bang

Bash style history substitution for Oh My Fish
Shell
118
star
5

theme-budspencer

A theme for nerds, makes fish even more powerful. It's equipped with a hell of a lot of nice functions and key bindings to speed up your workflow.
Shell
105
star
6

theme-agnoster

Shell
89
star
7

plugin-thefuck

โšก๏ธ Provide fast and painless support to TheFuck
Shell
65
star
8

plugin-z

Integration with z (autojump alternative).
Shell
63
star
9

plugin-osx

Integration with Finder and iTunes.
Shell
62
star
10

plugin-grc

grc Colourizer for some commands.
Shell
61
star
11

plugin-expand

Provides interactive word expansions in real-time
Shell
52
star
12

plugin-pj

The Project Jump plugin for the fish shell
Shell
50
star
13

plugin-peco

๐Ÿ” browse your fish history with peco
Shell
42
star
14

theme-clearance

A minimalist fish shell theme for people who use git
Shell
41
star
15

plugin-aws

Completions and integrations with the AWS CLI
Shell
41
star
16

theme-scorphish

Compact. Sufficient. PWD, Ruby+RVM, Python+VENV, Git status, Rust, NodeJS.
Shell
39
star
17

theme-default

Shell
39
star
18

plugin-proxy

Proxy settings plugin for Oh My Fish
Shell
37
star
19

theme-cmorrell.com

Theme with minimal base prompt, compact git status, and useful visual indicators for common scenarios.
Shell
34
star
20

plugin-pyenv

Simple Python Version Management integration.
Shell
34
star
21

theme-dangerous

A feature-rich theme derived from budspencer without powerline font.
Shell
33
star
22

theme-fishbone

A clean theme for fish shell managed by Oh my fish
Shell
32
star
23

plugin-tab

Open the current directory (or any other directory) in a new tab.
Shell
31
star
24

plugin-jump

A port of Jeroen Janssensโ€™ โ€œjumpโ€ utility.
Shell
31
star
25

plugin-weather

A simple, location-aware weather command for Fish
Shell
30
star
26

plugin-sudope

sudope plugin for Oh-My-Fish. Quickly put 'sudo' in your command
Shell
30
star
27

plugin-fasd

fasd plugin for Oh My Fish
Shell
28
star
28

theme-chain

A thin, classy theme composed of a chain of information
Shell
27
star
29

theme-robbyrussell

Shell
21
star
30

plugin-argu

Sane and easy to use argument parser for Oh My Fish!
Shell
21
star
31

plugin-vi-mode

Basic vi key bindings emulation for fish.
Shell
21
star
32

plugin-technicolor

Easy colorisation for Fish shell
Shell
20
star
33

plugin-extract

Plugin to expand or extract bundled & compressed files.
Shell
19
star
34

plugin-emacs

Wrapper for daemon functionality of Emacs.
Shell
19
star
35

marlin

A silvery, fast learning and interactive directory navigator
Shell
18
star
36

plugin-balias

Provide alias with auto completion.
Shell
18
star
37

plugin-cd

A featured cd can make your fish journey much more pleasant.
Shell
18
star
38

plugin-brew

Oh My Fish plugin to integrate Homebrew paths into shell.
Shell
17
star
39

theme-cbjohnson

Shell
17
star
40

plugin-theme

Quick theme switcher.
Shell
16
star
41

plugin-rvm

RVM Ruby version manager.
Shell
15
star
42

plugin-git-flow

git-flow Completion support for git-flow.
Shell
15
star
43

plugin-archlinux

Provides a number of plugins to make using Arch Linux easier.
Shell
15
star
44

plugin-title

Change your terminal title!
Shell
15
star
45

theme-eclm

Shell
15
star
46

theme-qing

A theme for Oh My Fish.
Shell
14
star
47

plugin-direnv

Unclutter your .profile http://direnv.net
Shell
14
star
48

plugin-functional

Shell
14
star
49

plugin-pbcopy

OSX's pbcopy and pbpaste for Linux.
Shell
13
star
50

plugin-rbenv

rbenv Ruby environment/version manager.
Shell
13
star
51

oh-my-fish-legacy

Oh My Fish!
Shell
13
star
52

theme-es

Fish shell theme
Shell
13
star
53

plugin-rustup

Shell
13
star
54

plugin-local-config

Support per-user, per-host and per-platform custom config files.
Shell
12
star
55

plugin-await

Wait last background job with a nice progress spinner
Shell
12
star
56

plugin-docker-machine

Plugin to integrate Docker Machine
Shell
12
star
57

theme-gnuykeaj

Shell
11
star
58

dockerfiles

Dockerfiles for Fish and Oh My Fish
Dockerfile
11
star
59

plugin-gi

gitignore.io CLI for fish.
Shell
11
star
60

theme-toaster

Shell
10
star
61

plugin-ta

Shell
10
star
62

plugin-vcs

A version control system abstraction layer for Fishshell
Shell
10
star
63

plugin-ssh-config.d

Load OpenSSH config from ~/.ssh/config.d/*.config files
Shell
10
star
64

plugin-node-binpath

Automatically add node_modules binaries to PATH
Shell
10
star
65

plugin-virtualfish

A simple wrapper for virtualfish
Shell
9
star
66

plugin-linuxbrew

Oh My Fish plugin to integrate Linuxbrew paths into shell.
Shell
9
star
67

theme-ocean

Shell
9
star
68

theme-bira

Shell
9
star
69

plugin-apt

Short and friendly command wrapper for APT
Shell
9
star
70

plugin-python

Set of shortcuts to Python based utilities (pybeatifyjson โ€“ clean JSON files, pyclean โ€“ remove old .pyc, pyhttp & pysmtp โ€“ simple HTTP & SMTP servers)
Shell
9
star
71

theme-godfather

Shell
8
star
72

plugin-license

Summon LICENSE file in a flash
8
star
73

plugin-sublime

Creates `subl` command line shortcut to launch Sublime Text editor.
Shell
8
star
74

plugin-spark

โ–โ–‚โ–ƒโ–…โ–‚โ–‡ in your shell
Shell
8
star
75

plugin-bundler

Use Ruby's Bundler automatically for some commands.
Shell
7
star
76

theme-red-snapper

Red Snapper Theme
Shell
7
star
77

theme-edan

A functional, uncluttered fish theme with usability perks for git users and python developers
Shell
7
star
78

plugin-composer

Composer PHP Dependency manager plugin for Oh My Fish
Shell
7
star
79

theme-fishface

Prompt for Fish Shell shaped like a fish, coloured green when in a git repo.
Shell
6
star
80

plugin-ssh

ssh conservative $TERM value helper.
Shell
6
star
81

plugin-errno

A Oh My Fish plugin to deal with POSIX error codes
Shell
6
star
82

plugin-wifi-password

Shell
6
star
83

theme-mars

Shell
6
star
84

plugin-hash

Computes string digests using various hashing algorithms
Shell
6
star
85

plugin-node

Adds locally installed NodeJS npm binary executable modules to the path.
Shell
6
star
86

plugin-dpaste

Shell
5
star
87

theme-coffeeandcode

Shell
5
star
88

plugin-getopts

A Unix compliant implementation of getopts for fish.
Shell
5
star
89

theme-yimmy

A simple two-line omf theme with support for terminals configured with Solarized Dark colors.
Shell
5
star
90

plugin-tmux

Plugin to start tmux with support for 256 colours.
Shell
5
star
91

plugin-bak

Helps you instantly backup and restore files
Shell
5
star
92

plugin-wttr

Shell
5
star
93

theme-krisleech

A Theme for Fish Shell
Shell
5
star
94

theme-trout

Shell
5
star
95

theme-gitstatus

Shell
5
star
96

theme-zish

Shell
4
star
97

theme-fishy-drupal

Shell
4
star
98

plugin-vscode

Visual Studio Code plugin for Oh My Fish.
Shell
4
star
99

theme-mtahmed

Shell
4
star
100

plugin-localhost

Opens http://localhost:3000 (and other ports) in the default browser.
Shell
4
star