Having to find helix is annoying... and in any case default to vim if it doesn't exist. If we end up on a box with no vim at all, we'd be calling an editor by path anyway.
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
export LANG=en_US.UTF-8
|
|
|
|
# Start keychain only on my personal system
|
|
if [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
|
|
eval `keychain --eval id_ed25519`
|
|
fi
|
|
|
|
# Put ~/bin first in my path so I can customize commands
|
|
# This isn't great on a security level and I should stop this.
|
|
export PATH=~/bin:$PATH
|
|
|
|
# Figure out my editor. I want helix if this box has it, but where it is
|
|
# is inconsistent thanks to Archlinux packaging. It can be /usr/bin/helix,
|
|
# or /usr/bin/hx. My puppet code creates /bin/hx to normalize this too.
|
|
# If we don't have helix, just shotgun using vim and pray.
|
|
if [ -e /bin/hx ]; then
|
|
export EDITOR=/bin/hx
|
|
elif [ -e /usr/bin/helix ]; then
|
|
export EDITOR=/usr/bin/helix
|
|
elif [ -e /usr/bin/hx ]; then
|
|
export EDITOR=/usr/bin/hx
|
|
else
|
|
export EDITOR=vim
|
|
fi
|
|
|
|
export VISUAL=$EDITOR
|
|
|
|
# Figure out my pager; these don't necessarily exist
|
|
if [ -e /usr/bin/bat ]; then
|
|
export PAGER="bat --plain"
|
|
elif [ -e /usr/bin/most ]; then
|
|
export PAGER=most
|
|
fi
|
|
|
|
# Set shell history values
|
|
# We use one history for any shell, which might bite us one day?
|
|
export HISTFILE=~/.history
|
|
export HISTSIZE=10000
|
|
export SAVEHIST=10000
|
|
|
|
# Use my special pythonrc to customize my REPL
|
|
export PYTHONSTARTUP=~/.config/pythonrc
|