Merge branch 'main' of ssh://git.scalene.net:22023/jswank/dotfiles

This commit is contained in:
Jason Swank
2025-01-07 21:05:41 +00:00
8 changed files with 75 additions and 49 deletions

View File

@@ -13,9 +13,9 @@ export FZF_DEFAULT_OPTS="--multi --height=40% --layout=reverse"
export GOPATH=~/go
# doesn't work on arch for tmux
path+=(~/bin)
path+=(~/.local/bin)
path+=($GOPATH/bin)
export PATH
#path+=(~/bin)
#path+=(~/.local/bin)
#path+=($GOPATH/bin)
#export PATH
export TMPDIR=/var/tmp

View File

@@ -1,5 +1,4 @@
alias ls='ls --color=auto'
alias mailx='/usr/local/bin/mailx'
alias grep='grep --color'
alias vim='nvim'
alias vi='nvim'
@@ -13,23 +12,52 @@ export PATH
# allow for # to be interpreted as a comment on the command line
setopt interactivecomments
PROMPT="%B%m:%~> %b"
# cd tricks
alias -- -='cd -'
setopt auto_cd # there is no binary by that name in your $PATH, your shell will cd into it that directory
# use vi-style keymap
bindkey -v
if [ "${TERM}" = "xterm" ]; then
TERM=xterm-256color
fi
case $TERM in
xterm*|st-256color|rxvt-unicode-256color)
print -Pn "\e]0;%m\a"
;;
esac
#
# Prompt setup
#
# populate colors arrays
autoload -U colors && colors
# git branch prompt
autoload -Uz vcs_info
setopt prompt_subst
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
# %% escapes '%'
# %S == "standout" => reverses fg/bg
# Surround color codes with '%{' and '%}'
# %r == repo name
# %b == branch name
# %S == relative directory
zstyle ':vcs_info:git*' formats '%%S%r%%s:%{$fg[red]%}%b%{$reset_color%} %S'
zstyle ':vcs_info:git*' actionformats '%%S%r%%s:%{$fg[red]%}%b:%a%{$reset_color%} %S'
function set_prompt() {
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
PROMPT="%B${vcs_info_msg_0_}> %b"
else
PROMPT="%B%m:%~> %b"
fi
}
precmd_functions+=( set_prompt )
#
# Configure SSH auth sock
#
#if [ -n "$SSH_AUTH_SOCK" ]; then
# if [ "$SSH_AUTH_SOCK" != $HOME/.ssh/ssh_auth_sock ]; then
@@ -38,6 +66,7 @@ esac
# fi
#fi
# setup SSH keys
if [ -e /usr/bin/keychain ]; then
eval $(/usr/bin/keychain --eval --agents ssh -Q --quiet id_ed25519)
fi
@@ -69,26 +98,6 @@ compinit
# Highlight the current autocomplete option
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
# git branch prompt
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
zstyle ':vcs_info:*' enable git cvs svn
# Better SSH/Rsync/SCP Autocomplete
#zstyle ':completion:*:(scp|rsync):*' tag-order ' hosts:-ipaddr:ip\ address hosts:-host:host files'
#zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost
#zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*'
#
# Allow for autocomplete to be case insensitive
#zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' \
# '+l:|?=** r:|?=**'
# command line completion for ssh
h=()
if [[ -r ~/.ssh/config ]]; then
@@ -102,10 +111,14 @@ if [[ $#h -gt 0 ]]; then
fi
zstyle :compinstall filename '~/.zshrc'
complete -C '/usr/bin/aws_completer' aws
if [[ -x /usr/bin/aws_completer ]]; then
complete -C '/usr/bin/aws_completer' aws
fi
#zstyle ':completion:*' completer _complete _ignored
#zstyle :compinstall filename '~/.zshrc'
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /home/cli/.local/bin/terraform terraform
autoload -Uz compinit
compinit