I guess I should setup zsh huh

master
Jordan Orelli 6 months ago
parent 0ebc537fe3
commit c5875a6b66

@ -0,0 +1,59 @@
# start up the autocompletions engine
autoload -Uz compinit && compinit
autoload -U colors && colors
# this has to do with git integration but I don't really get it yet
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
# vcs prompt info should be just the branch name
zstyle ':vcs_info:git:*' formats '%b'
# prompt configs
RPROMPT='${vcs_info_msg_0_}'
PROMPT='%F{green}%n@%m %~ ▷%f '
# history stuff
export HISTFILE=~/.zsh_history
export HISTSIZE=5000000
export SAVEHIST=$HISTSIZE
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
setopt SHARE_HISTORY # Share history between all sessions.
# misc ls configuration
LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:';
export LS_COLORS
alias ls="ls --color=auto"
# if kitty is installed, register its completions
if command -v kitty &> /dev/null
then
source <(kitty + complete setup zsh)
fi
# run local machine-specific settings
if [ -f "$HOME/.zlocalrc" ]; then
source "$HOME/.zlocalrc"
fi
# sometimes I put executables into ~/bin
if [ -d "$HOME/bin" ]; then
export PATH="$PATH:$HOME/bin"
fi
# add the Go bindir to the path if we have the standard Go install dir
if [ -d /usr/local/go ]; then
export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin
fi
if [[ -f "$HOME/.cargo/env" ]]; then
. "$HOME/.cargo/env"
fi

@ -1 +1 @@
Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95
Subproject commit 0765c5c4f485fa111f190e2d7dd89ec9f5b3f554

@ -13,6 +13,14 @@ files:
.bash_profile
.bashrc
[home zsh-prefs]
when: host.has('zsh')
files:
.zshrc
.zshenv
.zprofile
.zlogin
[home vim]
when: host.has('vim') or host.has('nvim')
files:
@ -124,7 +132,8 @@ files: k9s/skin.yml > .config/k9s/skin.yml
crates:
just
cargo-watch
cargo-edit
# this one isn't working on MacOS
# cargo-edit
cargo-get
[link-files gitui:linux]

Loading…
Cancel
Save