# Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 setopt appendhistory extendedglob notify histignoredups unsetopt autocd beep nomatch bindkey -v # End of lines configured by zsh-newuser-install # The following lines were added by compinstall zstyle :compinstall filename '/home/dholman/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall # Additional colors autoload -U colors %% colors # Additional completion options zstyle ':completion:*' use-cache on zstyle ':completion:*:cd:*' ignore-parents parent pwd zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*match:*' original only zstyle ':completion:*approximate:*' max-errors 1 numeric zstyle ':completion:*:*:kill:*' menu yes select zstyle ':completion:*:kill:*' force-list always zstyle ':completion:*' squeeze-slashes true # History options setopt hist_ignore_dups setopt hist_ignore_space # History search autoload -U up-line-or-beginning-search autoload -U down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search bindkey "^[[A" up-line-or-beginning-search bindkey "^[[B" down-line-or-beginning-search # Aliases alias ls="ls --color=auto" alias pacin="sudo pacman -S" alias pacr="sudo pacman -Rns" alias pacup="sudo pacman -Syu;auracle sync" alias msfconsole="sudo msfconsole -q" # Prompt settings setopt prompt_subst GIT_PS1_SHOWUPSTREAM=auto GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWUNTRACKEDFILES=1 GIT_PS1_SHOWCOLORHINTS=1 if [[ -z "$SSH_CLIENT" ]]; then PROMPT='%(?..%? )%3~ $(__git_ps1 "(%s)")%(!.#.$) ' else PROMPT='%(?..%? )%m %3~ $(__git_ps1 "(%s)")%(!.#.$) ' fi # Make shell stuff behave nicely pacsearch() { if [[ -z $1 ]]; then echo "No targets specified" return fi pacman -Ss $1 auracle search $1 } man() { env \ LESS_TERMCAP_mb=$'\e[01;31m' \ LESS_TERMCAP_md=$'\e[01;31m' \ LESS_TERMCAP_me=$'\e[0m' \ LESS_TERMCAP_se=$'\e[0m' \ LESS_TERMCAP_so=$'\e[01;44;33m' \ LESS_TERMCAP_ue=$'\e[0m' \ LESS_TERMCAP_us=$'\e[01;32m' \ man "$@" } rationalise-dot() { if [[ $LBUFFER = *.. ]]; then LBUFFER+=/.. else LBUFFER+=. fi } zle -N rationalise-dot bindkey . rationalise-dot