zsh/.zshrc

49 lines
1.1 KiB
Bash

#-*- mode: sh; -*-
# User configuration sourced by interactive shells
# Source zim
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
fi
# Command Specific Aliases
for i in $HOME/.aliases/command-specific/*
do
if hash $(basename $i) 2>/dev/null
then
source $i
fi
done
# General Aliases
source $HOME/.aliases/general
# Various Options
CORRECT_IGNORE="_*"
stty -ixon #disable XON/XOFF, which breaks C-s
setopt no_share_history
#load fasd if it exists
hash fasd 2>/dev/null && eval "$(fasd --init auto)"
# Load run-help
unalias run-help
autoload run-help
# Auto start tmux if a remote connection
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && [[ -n "$SSH_TTY" ]]
then
tmux_session='zim'
tmux start-server
# Create a 'prezto' session if no session has been defined in tmux.conf.
if ! tmux has-session 2> /dev/null; then
tmux \
new-session -d -s "$tmux_session" \; \
set-option -t "$tmux_session" destroy-unattached off &> /dev/null
fi
# Attach only to the prezto session
exec tmux new-session -A -s $tmux_session
fi