63 lines
1.3 KiB
Bash
63 lines
1.3 KiB
Bash
HISTFILE=~/.histfile
|
|
HISTSIZE=1000
|
|
SAVEHIST=1000
|
|
setopt notify
|
|
setopt extendedglob
|
|
unsetopt beep
|
|
bindkey -e
|
|
# Force xterm in 256 color mode
|
|
case $TERM in (xterm*)
|
|
TERM=xterm-256color
|
|
esac
|
|
|
|
# Source local zsh configs
|
|
if [ -f $HOME/.zshrc_local ]; then
|
|
source $HOME/.zshrc_local
|
|
fi
|
|
|
|
# Source modules
|
|
if [ -d "$HOME/.zshrc.d" ]; then
|
|
for sh in $HOME/.zshrc.d/*.zsh(N) ; do
|
|
[ -r "$sh" ] && source "$sh"
|
|
done
|
|
fi
|
|
|
|
# Source color tags for hostnames
|
|
if [ -f $HOME/.zsh_host_colors ]; then
|
|
source $HOME/.zsh_host_colors
|
|
HOST_COLOR="${HOST_COLORS[$(hostname | tr -d '\n')]}"
|
|
fi
|
|
|
|
# Default to none if not defined
|
|
if [ -z "$HOST_COLOR" ]; then
|
|
HOST_COLOR="none"
|
|
fi
|
|
|
|
# Source color tags for usernames
|
|
if [ -f $HOME/.zsh_user_colors ]; then
|
|
source $HOME/.zsh_user_colors
|
|
USER_COLOR="${USER_COLORS[$USER]}"
|
|
fi
|
|
|
|
# Default to none if not defined
|
|
if [ -z "$USER_COLOR" ]; then
|
|
USER_COLOR="none"
|
|
fi
|
|
# Prompt
|
|
PS1="%F{$USER_COLOR}%n%f@%F{$HOST_COLOR}%m %F{green}%/%f
|
|
$ "
|
|
|
|
declare -a PLUGINS
|
|
PLUGINS=(
|
|
"/data/data/com.termux/files/usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh"
|
|
"/usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh"
|
|
"/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
|
)
|
|
declare -r PLUGINS
|
|
|
|
for plugin in $PLUGINS; do
|
|
if [ -e "$plugin" ]; then
|
|
source $plugin
|
|
fi
|
|
done
|