bin/shrc/zshrc
Salt 278e3942a2 ssht: Add SSH Tor resolver thing
It fetches a given host's IP and connects to that directly
This way you can get a low-latency connection but still use Tor as a name service.
Sort of.
2018-10-19 19:02:18 -05:00

52 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env zsh
#
# ~/.zshrc
#
# Source /etc/profile
if [[ -f "/etc/profile" ]]; then
source /etc/profile 2>& /dev/null
fi
# General options
DEFAULT_USER=salt
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
export LANG="en_US.UTF-8"
setopt appendhistory autocd extendedglob nomatch
unsetopt beep notify
bindkey -e
# Partial history matching
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey '\e[A' history-beginning-search-backward-end
bindkey '\e[B' history-beginning-search-forward-end
# Set up styling
zstyle :compinstall filename '/home/salt/.zshrc'
# Completion
autoload -Uz compinit
compinit
compdef _git dot
compdef _ssh ssht
# The prompt
autoload -Uz promptinit
setopt prompt_percent
if [ "$SSH_CLIENT" = "" ]; then
PROMPT="[%F{blue}%~"
else
PROMPT="[%F{red}%B%m%b:%~"
fi
PROMPT="$PROMPT%f]%(0?..%F{red}%B?%b%f)%(!.%F{red}#%f.%F{green}$%f) "
promptinit
# Source .profile
if [[ -f "$HOME/.profile" ]]; then
source "$HOME/.profile" 2>& /dev/null
fi