You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
1.7 KiB
Bash
72 lines
1.7 KiB
Bash
8 years ago
|
# Load the functions, aliases and exports
|
||
10 years ago
|
for file in ~/dotfiles/zsh/{exports,aliases,functions}; do
|
||
11 years ago
|
[ -r "$file" ] && source "$file"
|
||
|
done
|
||
|
unset file
|
||
12 years ago
|
|
||
8 years ago
|
# a nice prompt, install it via npm to make this work
|
||
8 years ago
|
autoload -U promptinit; promptinit
|
||
11 years ago
|
prompt pure
|
||
|
|
||
|
# completions
|
||
|
autoload -U compinit && compinit -C
|
||
|
autoload bashcompinit && bashcompinit
|
||
|
|
||
|
# autocomplete for the git alias
|
||
|
compdef g=git
|
||
10 years ago
|
compdef gf=git-flow
|
||
11 years ago
|
|
||
|
# case-insensitive (all),partial-word and then substring completion
|
||
10 years ago
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||
12 years ago
|
|
||
11 years ago
|
unsetopt flowcontrol
|
||
8 years ago
|
unsetopt menu_complete # do not autoselect the first completion entry
|
||
9 years ago
|
setopt auto_menu # show completion menu on succesive tab press
|
||
11 years ago
|
setopt complete_in_word
|
||
|
setopt always_to_end
|
||
12 years ago
|
|
||
11 years ago
|
# history settings
|
||
|
if [ -z $HISTFILE ]; then
|
||
|
HISTFILE=$HOME/.zsh_history
|
||
|
fi
|
||
|
HISTSIZE=10000
|
||
|
SAVEHIST=10000
|
||
|
|
||
9 years ago
|
# easy vim/terminal switch
|
||
|
zle -N fancy-ctrl-z
|
||
|
bindkey '^Z' fancy-ctrl-z
|
||
|
|
||
11 years ago
|
setopt append_history
|
||
|
setopt extended_history
|
||
|
setopt hist_expire_dups_first
|
||
|
setopt hist_ignore_dups # ignore duplication command history list
|
||
|
setopt hist_ignore_space
|
||
|
setopt hist_verify
|
||
|
setopt inc_append_history
|
||
|
setopt share_history # share command history data
|
||
|
|
||
9 years ago
|
# smart urls
|
||
11 years ago
|
autoload -U url-quote-magic
|
||
|
zle -N self-insert url-quote-magic
|
||
|
|
||
9 years ago
|
# jobs
|
||
11 years ago
|
setopt long_list_jobs
|
||
|
|
||
8 years ago
|
# source some zsh plugins
|
||
11 years ago
|
source $HOME/dotfiles/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||
8 years ago
|
source $HOME/dotfiles/zsh/zsh-completions/zsh-completions.plugin.zsh
|
||
11 years ago
|
|
||
8 years ago
|
# nice dircolors for ls
|
||
8 years ago
|
export CLICOLOR=1
|
||
|
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||
10 years ago
|
|
||
8 years ago
|
# nvm
|
||
8 years ago
|
export NVM_DIR="$HOME/.nvm"
|
||
|
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||
8 years ago
|
|
||
|
# rbenv
|
||
|
eval "$(rbenv init -)"
|
||
8 years ago
|
|
||
|
# fzf
|
||
8 years ago
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|