#-*- 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 # Keybindings my-backward-kill-word () { local WORDCHARS=${WORDCHARS/\//} zle backward-kill-word } zle -N my-backward-kill-word bindkey '^H' my-backward-kill-word # Inserts 'sudo ' at the beginning of the line. function prepend-sudo() { if [[ "$BUFFER" != su(do|)\ * ]]; then BUFFER="sudo $BUFFER" (( CURSOR += 5 )) fi } zle -N prepend-sudo bindkey "^X^S" prepend-sudo setopt no_share_history #load fasd if it exists hash fasd 2>/dev/null && eval "$(fasd --init auto)"