Last active
June 30, 2022 16:44
-
-
Save ebruning/11a7fd68b1783e58f5b6d2791b1d1701 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
NT_PROMPT_SYMBOL=❱ | |
NEWLINE=$'\n' | |
autoload -Uz vcs_info add-zsh-hook | |
setopt PROMPT_SUBST | |
add-zsh-hook precmd vcs_info | |
precmd() { | |
if [[ -z $(git ls-files --other --exclude-standard 2>/dev/null) ]]; then | |
zstyle ':vcs_info:git:*' formats ' [ %F{166}%b%f %c%u%B%F{green}%f]' | |
else | |
zstyle ':vcs_info:git:*' formats ' [ %F{166}%b%f %c%u%B%F{red}●%F{green}%f]' | |
fi | |
vcs_info | |
} | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:svn:*' branchformat '%b' | |
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●' | |
zstyle ':vcs_info:*' stagedstr '%F{green}●' | |
zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)' | |
if [[ -n $SESSION_TYPE ]] | |
then | |
PROMPT='${NEWLINE}[%n@%m] %F{green}%~%f ${vcs_info_msg_0_}${NEWLINE}%F{72}${NT_PROMPT_SYMBOL} %F{250}' | |
else | |
PROMPT='${NEWLINE}%F{green}%~%f ${vcs_info_msg_0_}${NEWLINE}%F{72}${NT_PROMPT_SYMBOL} %F{250}' | |
fi |
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
SESSION_TYPE=local | |
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then | |
SESSION_TYPE=remote/ssh | |
else | |
case $(ps -o comm= -p $PPID) in | |
sshd | */sshd) SESSION_TYPE=remote/ssh ;; | |
esac | |
fi |
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
. "$HOME/.cargo/env" | |
export PYENV_ROOT="$HOME/.pyenv" | |
export EDITOR="nvim" | |
export VISUAL="nvim" | |
export PATH="$PYENV_ROOT/bin:$HOME/.rbenv/bin:$HOME/.local/bin:/home/ethan/.cargo/bin:$PATH" |
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
source $HOME/.prompt.zsh | |
HISTSIZE=1000 #How many lines of history to keep in memory | |
SAVEHIST=1000 #Number of history entries to save to disk | |
HISTFILE=~/.zsh_history #Where to save history to disk | |
setopt appendhistory #Append history to the history file (no overwriting) | |
setopt incappendhistory #Immediately append to the history file, not just when a term is killed | |
autoload -Uz compinit && compinit | |
autoload -U colors && colors | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # case insensitive match | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
eval "$(pyenv init -)" | |
eval "$(rbenv init -)" | |
[ -f "/usr/local/bin/exa" ] && alias ls="exa -bl --git --icons --time-style long-iso --group-directories-first" | |
[ -f "/usr/local/bin/nvim" ] && alias vi="nvim" | |
[ -f "/usr/local/bin/bat" ] && alias cat="bat" | |
alias df="duf" | |
function gam() { "/Users/ethan/bin/gam/gam" "$@" ; } | |
alias gam="/Users/ethan/bin/gamadv-xtd3/gam" | |
export PNPM_HOME="/Users/ethan/Library/pnpm" | |
export PATH="$PNPM_HOME:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment