• Stars
    star
    1,445
  • Rank 32,572 (Top 0.7 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

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

Repository Details

A Powerline-style, Git-aware fish theme optimized for awesome.

bobthefish

bobthefish is a Powerline-style, Git-aware fish theme optimized for awesome.

Oh My Fish MIT License

bobthefish

Installation

Be sure to have Oh My Fish installed. Then just:

omf install bobthefish

You will need a Powerline-patched font for this to work, unless you enable the compatibility fallback option:

set -g theme_powerline_fonts no

I recommend picking one of these. For more advanced awesome, install a nerd fonts patched font, and enable nerd fonts support:

set -g theme_nerd_fonts yes

This theme is based loosely on agnoster.

Features

  • A helpful, but not too distracting, greeting.
  • A subtle timestamp hanging out off to the right.
  • Powerline-style visual hotness.
  • More colors than you know what to do with.
  • An abbreviated path which doesn't abbreviate the name of the current project.
  • All the things you need to know about Git in a glance.
  • Visual indication that you can't write to the current directory.

The Prompt

  • Status flags:
    • Previous command failed (!)
    • Private mode (πŸ”’ or β¦Έ)
    • You currently have superpowers ($)
    • Background jobs (%)
  • Current vi mode
  • User@Host (unless you're the default user)
  • Current RVM, rbenv or chruby (Ruby) version
  • Current virtualenv (Python) version
    • If you use virtualenv, you will probably need to disable the default virtualenv prompt, since it doesn't play nice with fish: set -x VIRTUAL_ENV_DISABLE_PROMPT 1
  • Current NVM/FNM version (Nodejs) (inactive by default; see configurations in the next paragraph)
  • Abbreviated parent directory
  • Current directory, or Git or Mercurial project name
  • Current project's repo branch (branch-glyph master) or detached head (➦ d0dfd9b)
  • Git or Mercurial status, via colors and flags:
    • Dirty working directory (*)
    • Untracked files (…)
    • Staged changes (~)
    • Stashed changes ($)
    • Unpulled commits (-)
    • Unpushed commits (+)
    • Unpulled and unpushed commits (Β±)
    • Note that not all of these have been implemented for hg yet :)
  • Abbreviated project-relative path

Configuration

You can override some of the following default options in your config.fish:

set -g theme_display_git no
set -g theme_display_git_dirty no
set -g theme_display_git_untracked no
set -g theme_display_git_ahead_verbose yes
set -g theme_display_git_dirty_verbose yes
set -g theme_display_git_stashed_verbose yes
set -g theme_display_git_default_branch yes
set -g theme_git_default_branches master main
set -g theme_git_worktree_support yes
set -g theme_use_abbreviated_branch_name yes
set -g theme_display_vagrant yes
set -g theme_display_docker_machine no
set -g theme_display_k8s_context yes
set -g theme_display_hg yes
set -g theme_display_virtualenv no
set -g theme_display_nix no
set -g theme_display_ruby no
set -g theme_display_node yes
set -g theme_display_user ssh
set -g theme_display_hostname ssh
set -g theme_display_vi no
set -g theme_display_date no
set -g theme_display_cmd_duration yes
set -g theme_title_display_process yes
set -g theme_title_display_path no
set -g theme_title_display_user yes
set -g theme_title_use_abbreviated_path no
set -g theme_date_format "+%a %H:%M"
set -g theme_date_timezone America/Los_Angeles
set -g theme_avoid_ambiguous_glyphs yes
set -g theme_powerline_fonts no
set -g theme_nerd_fonts yes
set -g theme_show_exit_status yes
set -g theme_display_jobs_verbose yes
set -g default_user your_normal_user
set -g theme_color_scheme dark
set -g fish_prompt_pwd_dir_length 0
set -g theme_project_dir_length 1
set -g theme_newline_cursor yes
set -g theme_newline_prompt '$ '

Git options

  • theme_display_git_default_branch. By default theme will hide/collapse the branch name in your prompt when you are using a Git default branch i.e. historically master and often main now. Set to yes to stop these branches from being hidden/collapsed.
  • theme_git_default_branches. The big cloud repos (GitHub, Bitbucket, GitLab et al.) are moving away from using master as the default branch name, and allow you to choose your own. As of version 2.28, Git also supports custom default branch names via the init.defaultBranch config option. If our defaults of master main don't suit you, you can add/remove names in thist list i.e. main trunk. This ensures correct hiding/collapsing behaviour with custom default branch names (unless option above is activated).

Title options

  • theme_title_display_process. By default theme doesn't show current process name in terminal title. If you want to show it, just set to yes.
  • theme_title_display_path. Use no to hide current working directory from title.
  • theme_title_display_user. Set to yes to show the current user in the tab title (unless you're the default user).
  • theme_title_use_abbreviated_path. Default is yes. This means your home directory will be displayed as ~ and /usr/local as /u/local. Set it to no if you prefer full paths in title.

Prompt options

  • theme_display_ruby. Use no to completely hide all information about Ruby version. By default Ruby version displayed if there is the difference from default settings.
  • theme_display_node. If set to always, will display current NPM, NVM or FNM node version. If set to yes, will display the version if an .nvmrc, .node-version or package.json file is found in the parent directories.
  • theme_display_vagrant. This feature is disabled by default, use yes to display Vagrant status in your prompt. Please note that only the VirtualBox and VMWare providers are supported.
  • theme_display_vi. By default the vi mode indicator will be shown if vi or hybrid key bindings are enabled. Use no to hide the indicator, or yes to show the indicator.
  • theme_display_k8s_context. This feature is disabled by default. Use yes to show the current kubernetes context (> kubectl config current-context).
  • theme_display_k8s_namespace. This feature is disabled by default. Use yes to show the current kubernetes namespace.
  • theme_display_aws_vault_profile. This feature is disabled by default. Use yes to show the currently executing AWS Vault profile.
  • theme_display_user. If set to yes, display username always, if set to ssh, only when an SSH-Session is detected, if set to no, never.
  • theme_display_hostname. Same behaviour as theme_display_user.
  • theme_display_sudo_user. If set to yes, displays the sudo-username in a root shell. For example, when calling sudo -s and having this option set to yes, the username of the user, who called sudo -s, will be displayed.
  • theme_show_exit_status. Set this option to yes to have the prompt show the last exit code if it was non_zero instead of just the exclamation mark.
  • theme_display_jobs_verbose. If set to yes this option displays the number of currently running background jobs next to the percent sign.
  • theme_git_worktree_support. If you do any git worktree shenanigans, setting this to yes will fix incorrect project-relative path display. If you don't do any git worktree shenanigans, leave it disabled. It's faster this way :)
  • theme_use_abbreviated_branch_name. Set to yes to truncate git branch names in the prompt.
  • fish_prompt_pwd_dir_length. bobthefish respects the Fish $fish_prompt_pwd_dir_length setting to abbreviate the prompt path. Set to 0 to show the full path, 1 (default) to show only the first character of each parent directory name, or any other number to show up to that many characters.
  • theme_project_dir_length. The same as $fish_prompt_pwd_dir_length, but for the path relative to the current project root. Defaults to 0; set to any other number to show an abbreviated path.
  • theme_newline_cursor. Use yes to have cursor start on a new line. By default the prompt is only one line. When working with long directories it may be preferrend to have cursor on the next line. Setting this to clean instead of yes suppresses the caret on the new line.
  • theme_newline_prompt. Use a custom prompt with newline cursor. By default this is the chevron right glyph or > when powerline fonts are disabled.

Color scheme options

dark light
solarized solarized-light
base16 base16-light
zenburn terminal-dark
nord

You can use the function bobthefish_display_colors to preview the prompts in any color scheme.

Set theme_color_scheme in a terminal session or in your fish startup files to one of the following options to change the prompt colors.

  • dark. The default bobthefish theme.
  • light. A lighter version of the default theme.
  • solarized (or solarized-dark), solarized-light. Dark and light variants of Solarized.
  • base16 (or base16-dark), base16-light. Dark and light variants of the default Base16 theme.
  • zenburn. An adaptation of Zenburn.
  • gruvbox. An adaptation of gruvbox.
  • dracula. An adaptation of dracula.
  • nord. An adaptation of nord.

Some of these may not look right if your terminal does not support 24 bit color, in which case you can try one of the terminal schemes (below). However, if you're using Solarized, Base16 (default), or Zenburn in your terminal and the terminal does support 24 bit color, the built in schemes will look nicer.

There are several scheme that use whichever colors you currently have loaded into your terminal. The advantage of using the schemes that fall through to the terminal colors is that they automatically adapt to something acceptable whenever you change the 16 colors in your terminal profile.

  • terminal (or terminal-dark or terminal-dark-black)
  • terminal-dark-white. Same as terminal, but use white as the foreground color on top of colored segments (in case your colors are very dark).
  • terminal-light (or terminal-light-white)
  • terminal-light-black. Same as terminal-light, but use black as the foreground color on top of colored segments (in case your colors are very bright).

For some terminal themes, like dark base16 themes, the path segments in the prompt will be indistinguishable from the background. In those cases, try one of the following variations; they are identical to the terminal schemes except for using bright black (brgrey) and dull white (grey) in the place of black and bright white.

  • terminal2 (or terminal2-dark or terminal2-dark-black)
  • terminal2-dark-white
  • terminal2-light (or terminal2-light-white)
  • terminal2-light-black

Finally, you can specify your very own color scheme by setting theme_color_scheme to user. In that case, you also need to define some variables to set the colors of the prompt. See the "Colors" section of fish_prompt.fish for details.

VCS options

  • set -g theme_vcs_ignore_paths /some/path /some/other/path{foo,bar}. Ignore project paths for Git or Mercurial. Supports glob patterns.

Overrides

You can disable the theme default greeting, vi mode prompt, right prompt, or title entirelyΒ β€” or override with your own β€” by adding custom functions to ~/.config/fish/functions:

  • ~/.config/fish/functions/fish_greeting.fish
  • ~/.config/fish/functions/fish_mode_prompt.fish
  • ~/.config/fish/functions/fish_right_prompt.fish
  • ~/.config/fish/functions/fish_title.fish

To disable them completely, use an empty function:

function fish_right_prompt; end

… Or copy one from your favorite theme, make up something of your own, or copy/paste a bobthefish default function and modify it to your taste!

function fish_greeting
  set_color $fish_color_autosuggestion
  echo "I'm completely operational, and all my circuits are functioning perfectly."
  set_color normal
end

More Repositories

1

oh-my-fish

The Fish Shell Framework
Shell
10,319
star
2

packages-main

Primary Oh My Fish package repository.
235
star
3

plugin-foreign-env

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

plugin-bang-bang

Bash style history substitution for Oh My Fish
Shell
125
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
106
star
6

theme-agnoster

Shell
95
star
7

plugin-thefuck

⚑️ Provide fast and painless support to TheFuck
Shell
68
star
8

plugin-z

Integration with z (autojump alternative).
Shell
64
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-pj

The Project Jump plugin for the fish shell
Shell
53
star
12

plugin-expand

Provides interactive word expansions in real-time
Shell
53
star
13

plugin-aws

Completions and integrations with the AWS CLI
Shell
43
star
14

plugin-peco

πŸ” browse your fish history with peco
Shell
42
star
15

theme-clearance

A minimalist fish shell theme for people who use git
Shell
42
star
16

theme-scorphish

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

theme-default

Shell
40
star
18

plugin-pyenv

Simple Python Version Management integration.
Shell
38
star
19

plugin-proxy

Proxy settings plugin for Oh My Fish
Shell
38
star
20

theme-fishbone

A clean theme for fish shell managed by Oh my fish
Shell
34
star
21

theme-cmorrell.com

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

theme-dangerous

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

plugin-sudope

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

plugin-weather

A simple, location-aware weather command for Fish
Shell
31
star
25

plugin-tab

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

plugin-jump

A port of Jeroen Janssens’ β€œjump” utility.
Shell
31
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
28
star
29

theme-robbyrussell

Shell
22
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

plugin-cd

A featured cd can make your fish journey much more pleasant.
Shell
19
star
36

marlin

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

plugin-balias

Provide alias with auto completion.
Shell
18
star
38

plugin-theme

Quick theme switcher.
Shell
17
star
39

plugin-brew

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

theme-cbjohnson

Shell
17
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-qing

A theme for Oh My Fish.
Shell
14
star
46

plugin-direnv

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

theme-eclm

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

theme-toaster

Shell
12
star
55

plugin-local-config

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

plugin-await

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

plugin-docker-machine

Plugin to integrate Docker Machine
Shell
12
star
58

plugin-ta

Shell
11
star
59

theme-gnuykeaj

Shell
11
star
60

dockerfiles

Dockerfiles for Fish and Oh My Fish
Dockerfile
11
star
61

plugin-vcs

A version control system abstraction layer for Fishshell
Shell
11
star
62

plugin-node-binpath

Automatically add node_modules binaries to PATH
Shell
11
star
63

plugin-gi

gitignore.io CLI for fish.
Shell
11
star
64

plugin-ssh-config.d

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

theme-godfather

Shell
9
star
66

plugin-linuxbrew

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

plugin-virtualfish

A simple wrapper for virtualfish
Shell
9
star
68

theme-ocean

Shell
9
star
69

plugin-apt

Short and friendly command wrapper for APT
Shell
9
star
70

theme-bira

Shell
9
star
71

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
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-composer

Composer PHP Dependency manager plugin for Oh My Fish
Shell
8
star
76

theme-fishface

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

plugin-bundler

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

theme-red-snapper

Red Snapper Theme
Shell
7
star
79

theme-edan

A functional, uncluttered fish theme with usability perks for git users and python developers
Shell
7
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

plugin-dpaste

Shell
6
star
84

theme-mars

Shell
6
star
85

plugin-hash

Computes string digests using various hashing algorithms
Shell
6
star
86

plugin-node

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

theme-coffeeandcode

Shell
5
star
88

plugin-getopts

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

plugin-bak

Helps you instantly backup and restore files
Shell
5
star
90

theme-yimmy

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

plugin-wttr

Shell
5
star
92

plugin-localhost

Opens http://localhost:3000 (and other ports) in the default browser.
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-gityaw

Replace Git HTTPS remote by SSH one
Shell
4
star
99

theme-mtahmed

Shell
4
star
100

plugin-vscode

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