Last active
January 11, 2023 20:13
-
-
Save brybrophy/8d4881b118c69c7936fda6eaef510c49 to your computer and use it in GitHub Desktop.
This zsh theme is based on Ryan Sobol's fish shell theme.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To make this work like Ryan's original fish shell, install the following ZSH plugins and use the sobol.zsh-theme. | |
https://github.com/zsh-users/zsh-autosuggestions | |
https://github.com/zsh-users/zsh-syntax-highlighting | |
Add this command to your zshrc file. | |
alias gbra="git branch | grep -v "master" | grep -v "main" | xargs git branch -D" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sobol ZSH Theme | |
# settings | |
typeset +H _current_dir="%{$fg_bold[blue]%}%3~%{$reset_color%} " | |
typeset +H _return_status="%{$fg_bold[red]%}%(?..⍉)%{$reset_color%}" | |
typeset +H _hist_no="%{$fg[grey]%}%h%{$reset_color%}" | |
PROMPT=' | |
%{%(?.$fg[blue].$fg[red])%}$(_fishy_collapsed_wd) $(git_prompt_info) $(ruby_prompt_info)%{%(!.${fg[red]}.${fg[white]})%}%{$reset_color%}' | |
PROMPT2='%{%(!.${fg[red]}.${fg[white]})%}◀%{$reset_color%}' | |
function _fishy_collapsed_wd() { | |
echo $(pwd | perl -pe ' | |
BEGIN { | |
binmode STDIN, ":encoding(UTF-8)"; | |
binmode STDOUT, ":encoding(UTF-8)"; | |
}; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g | |
') | |
} | |
MODE_INDICATOR="%{$fg_bold[yellow]%}❮%{$reset_color%}%{$fg[yellow]%}❮❮%{$reset_color%}" | |
# Git prompt settings | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✖%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}✚ " | |
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%}⚑ " | |
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✖ " | |
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}▴ " | |
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}§ " | |
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[white]%}◒ " | |
# Ruby prompt settings | |
ZSH_THEME_RUBY_PROMPT_PREFIX="%{$fg[grey]%}" | |
ZSH_THEME_RUBY_PROMPT_SUFFIX="%{$reset_color%}" | |
# LS colors, made with https://geoff.greer.fm/lscolors/ | |
export LSCOLORS="exfxcxdxbxegedabagacad" | |
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' | |
export GREP_COLOR='1;33' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment