main dotfiles / dot_config / yash / rc
Eric Bower  ·  2026-06-09
 1. --autoload --no-alias initialization/common
 2
 3set -o vi
 4bindkey --vi-insert '\^F' accept-prediction
 5
 6if test -e "$HOME/.config/yash/private.sh"; then
 7  . "$HOME/.config/yash/private.sh"
 8fi
 9
10export PATH="$HOME/.local/bin:/usr/local/go/bin:$HOME/.cargo/bin:$HOME/.npm-packages/bin:$PATH"
11export LANG=en_US.UTF-8
12export EDITOR=kak
13export VISUAL=kak
14export GPG_TTY="$(tty)"
15export XDG_CONFIG_HOME="$HOME/.config"
16export VDIRSYNCER_CONFIG="$HOME/.config/vdirsyncer/config"
17export MDIR="$HOME/mail"
18export COLORTERM=truecolor
19
20alias pushall='git remote | xargs -I R git push R'
21alias sway='sway --unsupported-gpu'
22alias tre='tree -CF --dirsfirst -L2'
23alias pp='PA_DIR=/home/erock/dev/pico/pico-pass pa'
24alias logs='ssh pipe sub /pico/log-drain -k | jq -r'
25alias ash='autossh -M 0 -q'
26alias keys='keychain --eval --quiet --agents ssh,gpg ~/.ssh/id_ed25519 76D3FD02 | source'
27alias mdfmt='uvx --with=mdformat-gfm --with=mdformat-frontmatter --with=mdformat-gfm-alerts mdformat --wrap no'
28alias cai='claude --dangerously-skip-permissions'
29
30pw() {
31  tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 16; echo
32}
33
34if test -n "${ZMX_SESSION:-}"; then
35  export YASH_PS1="[$ZMX_SESSION] ${YASH_PS1}"
36fi
37
38# if command -v zmx > /dev/null 2>&1; then
39#   eval "$(zmx completions bash)"
40# fi
41
42_update_direnv() {
43  if ! command -v direnv > /dev/null 2>&1; then
44    return
45  fi
46
47 eval "$(
48   direnv export json |
49   jq -r 'to_entries | .[] |
50   if .value == null then
51     @sh "unset \(.key)"
52   else
53     @sh "export \(.key)=\(.value)"
54   end'
55 )"
56}
57_update_direnv
58YASH_AFTER_CD=("$YASH_AFTER_CD" '_update_direnv')