From c5875a6b666b8d0e6efbd0b4ff87f85387d2edce Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Wed, 29 May 2024 11:13:37 -0500 Subject: [PATCH] I guess I should setup zsh huh --- .zlogin | 0 .zprofile | 0 .zshenv | 0 .zshrc | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Vundle.vim | 2 +- config.ini | 11 +++++++++- 6 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .zlogin create mode 100644 .zprofile create mode 100644 .zshenv create mode 100644 .zshrc diff --git a/.zlogin b/.zlogin new file mode 100644 index 0000000..e69de29 diff --git a/.zprofile b/.zprofile new file mode 100644 index 0000000..e69de29 diff --git a/.zshenv b/.zshenv new file mode 100644 index 0000000..e69de29 diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..304ed3f --- /dev/null +++ b/.zshrc @@ -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 + diff --git a/Vundle.vim b/Vundle.vim index b255382..0765c5c 160000 --- a/Vundle.vim +++ b/Vundle.vim @@ -1 +1 @@ -Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95 +Subproject commit 0765c5c4f485fa111f190e2d7dd89ec9f5b3f554 diff --git a/config.ini b/config.ini index f07518f..0579fa3 100644 --- a/config.ini +++ b/config.ini @@ -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]