Last active
August 13, 2021 20:45
-
-
Save LosAlamosAl/a662f0204a310631750906edd4bd2146 to your computer and use it in GitHub Desktop.
My ZSH configuration file
This file contains hidden or 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 configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="sunrise" | |
#ZSH_THEME="blinks" | |
#ZSH_THEME="random" | |
#ZSH_THEME="robbyrussell" | |
#ZSH_THEME="kphoen" | |
ZSH_THEME="kennethreitz" | |
#ZSH_THEME="mh" | |
#ZSH_THEME="avit" | |
#ZSH_THEME="muse" | |
#ZSH_THEME="wedisagree" | |
#ZSH_THEME="miloshadzic" | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
# Set to this to use case-sensitive completion | |
# CASE_SENSITIVE="true" | |
# Comment this out to disable weekly auto-update checks | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment following line if you want to disable colors in ls | |
# DISABLE_LS_COLORS="true" | |
# Uncomment following line if you want to disable autosetting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment following line if you want red dots to be displayed while waiting for completion | |
# COMPLETION_WAITING_DOTS="true" | |
# 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) | |
plugins=(aws git git-prompt docker docker-compose virtualenv vagrant vagrant-prompt) | |
# For aws: aliases (agp: print user), (asp: set user with completion | |
# and add to prompt) | |
# Customize to your needs... | |
# ------------------------------------------------------------------- | |
# any function from http://onethingwell.org/post/14669173541/any | |
# search for running processes | |
# ------------------------------------------------------------------- | |
any() { | |
emulate -L zsh | |
unsetopt KSH_ARRAYS | |
if [[ -z "$1" ]] ; then | |
echo "any - grep for process(es) by keyword" >&2 | |
echo "Usage: any " >&2 ; return 1 | |
else | |
ps xauwww | grep -i --color=auto "[${1[1]}]${1[2,-1]}" | |
fi | |
} | |
# Enable running Jupyter notebooks (Python) in a virtual environment | |
# http://matplotlib.org/faq/virtualenv_faq.html | |
# Can now run with: | |
# frameworkpython -m jupyter notebook | |
# Kind of sucks because you can't use any version of Python (which is | |
# the reason for running virtual environments in the first place. | |
function frameworkpython { | |
if [[ ! -z "$VIRTUAL_ENV" ]]; then | |
PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python "$@" | |
else | |
/usr/local/bin/python "$@" | |
fi | |
} | |
# Needed to move this down after the proxies have been set | |
# or it will fail to update. Still need to figure out how | |
# set proxies selectively (only on LANL systems that require | |
# them). | |
export ZSH_DISABLE_COMPFIX=true | |
source $ZSH/oh-my-zsh.sh | |
# Show grep matches in color (override oh-my-zsh's color) | |
export GREP_COLOR='1;31' | |
alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" | |
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD | |
# HLedger | |
alias hl=hledger | |
export LEDGER_FILE=$HOME/Bocks/2017.journal | |
# Appear to need this to sign commits in git. | |
export GPG_TTY=$(tty) | |
# Enable AWS CLI command completion | |
autoload bashcompinit && bashcompinit | |
complete -C '/usr/local/bin/aws_completer' aws | |
export PATH="$HOME/.poetry/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment