first
This commit is contained in:
parent
525d712b92
commit
c0dd11b29c
2 changed files with 81 additions and 1 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
# zsh-basics
|
# zsh-basics
|
||||||
|
|
||||||
Basic Options for zsh configuration
|
Basic Options for zsh configuration.
|
||||||
|
|
|
||||||
80
zsh-basics.plugin.zsh
Normal file
80
zsh-basics.plugin.zsh
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
zmodload -i zsh/complist
|
||||||
|
|
||||||
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue