unsetopt BEEP unsetopt menu_complete unsetopt flowcontrol setopt always_to_end setopt append_history setopt auto_cd setopt auto_list setopt auto_menu setopt auto_param_keys setopt auto_param_slash setopt complete_aliases setopt complete_in_word setopt extended_glob setopt extended_history setopt glob_dots setopt inc_append_history setopt interactive_comments setopt list_packed setopt list_types setopt nomatch setopt share_history setopt hist_ignore_dups setopt hist_ignore_all_dups zmodload -i zsh/complist _complete_plus_last_command_args() { last_command=$history[$[HISTCMD-1]] last_command_array=("${(s/ /)last_command}") _sep_parts last_command_array _complete } # zstyle ':completion:*' completer _complete_plus_last_command_args _complete zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' special-dirs true zstyle ':completion:*' use-cache yes zstyle ':completion:*' cache-path $ZSH_CACHE_DIR # Include hidden files. _comp_options+=(globdots) zle_highlight=('paste:none') HISTFILE="$HOME/.zsh_history" SAVEHIST=10000 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 # Colors autoload -Uz colors && colors # exports export PATH="$HOME/.local/bin":$PATH # bindings bindkey -s '^x' '^usource ~/.zshrc\n' bindkey "^[[H" beginning-of-line bindkey "^[[F" end-of-line bindkey "\e[3~" delete-char bindkey "^[[3;5~" kill-word bindkey ' ' magic-space bindkey '^[[A' up-line-or-search bindkey '^[[B' down-line-or-search # ls colors case "$(uname -s)" in Darwin) # echo 'Mac OS X' alias ls='ls -G' ;; Linux) alias ls='ls --color=auto' ;; CYGWIN* | MINGW32* | MSYS* | MINGW*) # echo 'MS Windows' ;; *) # echo 'Other OS' ;; esac # completions autoload -Uz compinit && compinit