Last active
November 15, 2019 11:49
-
-
Save cbecker/167c2defa16c8c2ae24dbb4cba9f0cf7 to your computer and use it in GitHub Desktop.
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
# | |
# Sets Prezto options. | |
# | |
# Authors: | |
# Sorin Ionescu <sorin.ionescu@gmail.com> | |
# | |
# | |
# General | |
# | |
# Set case-sensitivity for completion, history lookup, etc. | |
# zstyle ':prezto:*:*' case-sensitive 'yes' | |
# Color output (auto set to 'no' on dumb terminals). | |
zstyle ':prezto:*:*' color 'yes' | |
# Set the Zsh modules to load (man zshmodules). | |
# zstyle ':prezto:load' zmodule 'attr' 'stat' | |
# Set the Zsh functions to load (man zshcontrib). | |
# zstyle ':prezto:load' zfunction 'zargs' 'zmv' | |
# Set the Prezto modules to load (browse modules). | |
# The order matters. | |
zstyle ':prezto:load' pmodule \ | |
'environment' \ | |
'terminal' \ | |
'editor' \ | |
'history' \ | |
'directory' \ | |
'spectrum' \ | |
'utility' \ | |
'completion' \ | |
'history-substring-search' \ | |
'git' \ | |
'prompt' | |
# | |
# Autosuggestions | |
# | |
# Set the query found color. | |
# zstyle ':prezto:module:autosuggestions:color' found '' | |
# | |
# Completions | |
# | |
# Set the entries to ignore in static */etc/hosts* for host completion. | |
# zstyle ':prezto:module:completion:*:hosts' etc-host-ignores \ | |
# '0.0.0.0' '127.0.0.1' | |
# | |
# Editor | |
# | |
# Set the key mapping style to 'emacs' or 'vi'. | |
zstyle ':prezto:module:editor' key-bindings 'emacs' | |
# Auto convert .... to ../.. | |
# zstyle ':prezto:module:editor' dot-expansion 'yes' | |
# Allow the zsh prompt context to be shown. | |
#zstyle ':prezto:module:editor' ps-context 'yes' | |
# | |
# Git | |
# | |
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'. | |
# zstyle ':prezto:module:git:status:ignore' submodules 'all' | |
# | |
# GNU Utility | |
# | |
# Set the command prefix on non-GNU systems. | |
# zstyle ':prezto:module:gnu-utility' prefix 'g' | |
# | |
# History Substring Search | |
# | |
# Set the query found color. | |
# zstyle ':prezto:module:history-substring-search:color' found '' | |
# Set the query not found color. | |
# zstyle ':prezto:module:history-substring-search:color' not-found '' | |
# Set the search globbing flags. | |
# zstyle ':prezto:module:history-substring-search' globbing-flags '' | |
# | |
# OS X | |
# | |
# Set the keyword used by `mand` to open man pages in Dash.app | |
# zstyle ':prezto:module:osx:man' dash-keyword 'manpages' | |
# | |
# Pacman | |
# | |
# Set the Pacman frontend. | |
# zstyle ':prezto:module:pacman' frontend 'yaourt' | |
# | |
# Prompt | |
# | |
# Set the prompt theme to load. | |
# Setting it to 'random' loads a random theme. | |
# Auto set to 'off' on dumb terminals. | |
zstyle ':prezto:module:prompt' theme 'steeef' | |
# Set the working directory prompt display length. | |
# By default, it is set to 'short'. Set it to 'long' (without '~' expansion) | |
# for longer or 'full' (with '~' expansion) for even longer prompt display. | |
# zstyle ':prezto:module:prompt' pwd-length 'short' | |
# Set the prompt to display the return code along with an indicator for non-zero | |
# return codes. This is not supported by all prompts. | |
# zstyle ':prezto:module:prompt' show-return-val 'yes' | |
# | |
# Ruby | |
# | |
# Auto switch the Ruby version on directory change. | |
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes' | |
# | |
# Python | |
# | |
# Auto switch the Python virtualenv on directory change. | |
# zstyle ':prezto:module:python:virtualenv' auto-switch 'yes' | |
# Automatically initialize virtualenvwrapper if pre-requisites are met. | |
# zstyle ':prezto:module:python:virtualenv' initialize 'yes' | |
# | |
# Screen | |
# | |
# Auto start a session when Zsh is launched in a local terminal. | |
# zstyle ':prezto:module:screen:auto-start' local 'yes' | |
# Auto start a session when Zsh is launched in a SSH connection. | |
# zstyle ':prezto:module:screen:auto-start' remote 'yes' | |
# | |
# SSH | |
# | |
# Set the SSH identities to load into the agent. | |
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github' | |
# | |
# Syntax Highlighting | |
# | |
# Set syntax highlighters. | |
# By default, only the main highlighter is enabled. | |
# zstyle ':prezto:module:syntax-highlighting' highlighters \ | |
# 'main' \ | |
# 'brackets' \ | |
# 'pattern' \ | |
# 'line' \ | |
# 'cursor' \ | |
# 'root' | |
# | |
# Set syntax highlighting styles. | |
# zstyle ':prezto:module:syntax-highlighting' styles \ | |
# 'builtin' 'bg=blue' \ | |
# 'command' 'bg=blue' \ | |
# 'function' 'bg=blue' | |
# | |
# Set syntax pattern styles. | |
# zstyle ':prezto:module:syntax-highlighting' pattern \ | |
# 'rm*-rf*' 'fg=white,bold,bg=red' | |
# | |
# Terminal | |
# | |
# Auto set the tab and window titles. | |
# zstyle ':prezto:module:terminal' auto-title 'yes' | |
# Set the window title format. | |
# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' | |
# Set the tab title format. | |
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s' | |
# Set the terminal multiplexer title format. | |
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s' | |
# | |
# Tmux | |
# | |
# Auto start a session when Zsh is launched in a local terminal. | |
# zstyle ':prezto:module:tmux:auto-start' local 'yes' | |
# Auto start a session when Zsh is launched in a SSH connection. | |
# zstyle ':prezto:module:tmux:auto-start' remote 'yes' | |
# Integrate with iTerm2. | |
# zstyle ':prezto:module:tmux:iterm' integrate 'yes' | |
# Set the default session name: | |
# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME' | |
# | |
# Utility | |
# | |
# Enabled safe options. This aliases cp, ln, mv and rm so that they prompt | |
# before deleting or overwriting files. Set to 'no' to disable this safer | |
# behavior. | |
# zstyle ':prezto:module:utility' safe-ops 'yes' |
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
# | |
# Executes commands at the start of an interactive session. | |
# | |
# Authors: | |
# Sorin Ionescu <sorin.ionescu@gmail.com> | |
# | |
# Source Prezto. | |
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then | |
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" | |
fi | |
source $HOME/.bash_profile | |
# Customize to your needs... | |
export PATH=/Users/carlos/.local/bin:/Users/carlos/anaconda3/bin:/Applications/Julia-0.5.app/Contents/Resources/julia/bin/:/Applications/Atom.app/Contents/Resources/app/:/Users/carlos/Applications/shortcuts:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/carlos/.vimpkg/bin |
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
# | |
# A theme based on Steve Losh's Extravagant Prompt with vcs_info integration. | |
# | |
# Authors: | |
# Steve Losh <steve@stevelosh.com> | |
# Bart Trojanowski <bart@jukie.net> | |
# Brian Carper <brian@carper.ca> | |
# steeef <steeef@gmail.com> | |
# Sorin Ionescu <sorin.ionescu@gmail.com> | |
# | |
# Screenshots: | |
# http://i.imgur.com/HyRvv.png | |
# | |
function prompt_steeef_precmd { | |
# Check for untracked files or updated submodules since vcs_info does not. | |
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then | |
branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c${_prompt_steeef_colors[4]}●%f)" | |
else | |
branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c)" | |
fi | |
zstyle ':vcs_info:*:prompt:*' formats "${branch_format}" | |
vcs_info 'prompt' | |
if (( $+functions[python-info] )); then | |
python-info | |
fi | |
} | |
function prompt_steeef_setup { | |
setopt LOCAL_OPTIONS | |
unsetopt XTRACE KSH_ARRAYS | |
prompt_opts=(cr percent sp subst) | |
# Load required functions. | |
autoload -Uz add-zsh-hook | |
autoload -Uz vcs_info | |
# Add hook for calling vcs_info before each command. | |
add-zsh-hook precmd prompt_steeef_precmd | |
# Tell prezto we can manage this prompt | |
zstyle ':prezto:module:prompt' managed 'yes' | |
# Use extended color pallete if available. | |
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then | |
_prompt_steeef_colors=( | |
"%F{81}" # Turquoise | |
"%F{166}" # Orange | |
"%F{135}" # Purple | |
"%F{161}" # Hotpink | |
"%F{118}" # Limegreen | |
) | |
else | |
_prompt_steeef_colors=( | |
"%F{cyan}" | |
"%F{yellow}" | |
"%F{magenta}" | |
"%F{red}" | |
"%F{green}" | |
) | |
fi | |
# Formats: | |
# %b - branchname | |
# %u - unstagedstr (see below) | |
# %c - stagedstr (see below) | |
# %a - action (e.g. rebase-i) | |
# %R - repository path | |
# %S - path in the repository | |
local branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c)" | |
local action_format="(${_prompt_steeef_colors[5]}%a%f)" | |
local unstaged_format="${_prompt_steeef_colors[2]}●%f" | |
local staged_format="${_prompt_steeef_colors[5]}●%f" | |
# Set editor-info parameters. | |
zstyle ':prezto:module:editor:info:keymap:primary' format '$' | |
# Set vcs_info parameters. | |
zstyle ':vcs_info:*' enable bzr git hg svn | |
zstyle ':vcs_info:*:prompt:*' check-for-changes true | |
zstyle ':vcs_info:*:prompt:*' unstagedstr "${unstaged_format}" | |
zstyle ':vcs_info:*:prompt:*' stagedstr "${staged_format}" | |
zstyle ':vcs_info:*:prompt:*' actionformats "${branch_format}${action_format}" | |
zstyle ':vcs_info:*:prompt:*' formats "${branch_format}" | |
zstyle ':vcs_info:*:prompt:*' nvcsformats "" | |
# Set python-info parameters. | |
zstyle ':prezto:module:python:info:virtualenv' format '(%v)' | |
# Define prompts. | |
PROMPT="${_prompt_steeef_colors[3]}%n%f at ${_prompt_steeef_colors[2]}%m%f ${_prompt_steeef_colors[5]}%~%f "'${vcs_info_msg_0_}'""'$python_info[virtualenv]${editor_info[keymap]} ' | |
RPROMPT='' | |
} | |
function prompt_steeef_preview { | |
local +h PROMPT='' | |
local +h RPROMPT='' | |
local +h SPROMPT='' | |
editor-info 2> /dev/null | |
prompt_preview_theme 'steeef' | |
} | |
prompt_steeef_setup "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment