Last active
February 8, 2019 08:03
-
-
Save zevisert/ec51f36dfbe16f0e27ab11bbb4e9d8ba 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
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="zev" | |
## Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
## Uncomment the following line to use hyphen-insensitive completion. Case | |
## sensitive completion must be off. _ and - will be interchangeable. | |
# HYPHEN_INSENSITIVE="true" | |
## Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
## Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
## Uncomment the following line to enable command auto-correction. | |
# ENABLE_CORRECTION="true" | |
## Uncomment the following line to display red dots whilst waiting for completion. | |
COMPLETION_WAITING_DOTS="true" | |
## Uncomment the following line if you want to disable marking untracked files | |
## under VCS as dirty. This makes repository status check for large repositories | |
## much, much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
## Uncomment the following line if you want to change the command execution time | |
## stamp shown in the history command output. | |
## The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
HIST_STAMPS="dd/mm/yyyy" | |
## Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
## Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) | |
## Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
## Example format: plugins=(rails git textmate ruby lighthouse) | |
## Add wisely, as too many plugins slow down shell startup. | |
plugins=(git) | |
## ssh-agent manager | |
eval `keychain --quiet --clear --eval zevisert-ssh` | |
# Finally pass settings to oh-my-zsh | |
source $ZSH/oh-my-zsh.sh | |
#################################### | |
## User configuration | |
#################################### | |
## quick swtich to dev environments | |
dev () | |
{ | |
cd "/mnt/c/Users/zevisert/dev/$@" | |
} | |
## Point WSL docker to Windows Docker | |
export DOCKER_HOST=tcp://0.0.0.0:2375 | |
## Enable node version switcher | |
export NVS_HOME="$HOME/.nvs" | |
[ -s "$NVS_HOME/nvs.sh" ] && . "$NVS_HOME/nvs.sh" | |
nvs auto on | |
## Use vim everywhere | |
export VISUAL=vim | |
export EDITOR="$VISUAL" | |
## Set personal aliases, overriding those provided by oh-my-zsh libs, | |
## plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
## users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
## For a full list of active aliases, run `alias`. | |
alias dirs="dirs -v" | |
# Initialize shell completions | |
autoload -Uz compinit | |
compinit |
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
function collapse_pwd { | |
echo $(pwd | sed -e "s,^$HOME,~,") | |
} | |
function prompt_char { | |
[[ $PWD/ = /mnt/* ]] && echo '◆ ' && return | |
echo '◇ ' | |
} | |
function my_git_prompt_info { | |
local ref | |
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 | |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
fi | |
} | |
PROMPT=' | |
%{$fg[green]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[darkgreen]%}$(collapse_pwd)%{$reset_color%}$(my_git_prompt_info) | |
$(prompt_char) ' | |
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment