92 lines
3.1 KiB
Bash
92 lines
3.1 KiB
Bash
# Check if zshrc has been modified
|
|
# I like jokes, but I prefer when I'm the one who makes them
|
|
# git -C $DOTFILES diff --exit-code zshrc zsh > /dev/null 2>&1
|
|
#
|
|
# if [ $? -ne 0 ]; then
|
|
# echo >&2 "Your zshrc has been modified... nothing will be executed, please check it"
|
|
# alias source=:
|
|
# return
|
|
# fi
|
|
|
|
# Set to this to use case-sensitive completion
|
|
# CASE_SENSITIVE="true"
|
|
|
|
# Uncomment following line if you want to disable autosetting terminal title.
|
|
DISABLE_AUTO_TITLE="true"
|
|
|
|
if [ -z $TERMINAL_UUID ]; then
|
|
export TERMINAL_UUID=$(uuidgen)
|
|
fi
|
|
echo -en "\e]2;$TERMINAL_UUID\a"
|
|
|
|
# Uncomment following line if you want red dots to be displayed while waiting for completion
|
|
# COMPLETION_WAITING_DOTS="true"
|
|
|
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/me
|
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
|
plugins=(git myjump pass $ZSH_EXTRA_PLUGINS)
|
|
zstyle ':omz:alpha:lib:git' async-prompt no
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
# Source gulp completion
|
|
# source ~/.config/zsh/extensions/gulp.plugin.zsh/gulp.plugin.zsh
|
|
|
|
# Config of stderred
|
|
# if [ -f "/usr/lib/libstderred.so" ]; then
|
|
# export LD_PRELOAD="/usr/lib/libstderred.so"
|
|
# fi
|
|
|
|
unsetopt correctall
|
|
unsetopt autocd
|
|
unsetopt cdablevars
|
|
setopt inc_append_history
|
|
unsetopt share_history
|
|
setopt HIST_IGNORE_SPACE
|
|
|
|
export HISTSIZE=100000
|
|
export SAVEHIST=$HISTSIZE
|
|
|
|
autoload -Uz up-line-or-beginning-search
|
|
autoload -Uz down-line-or-beginning-search
|
|
zle -N up-line-or-beginning-search
|
|
zle -N down-line-or-beginning-search
|
|
zle -N gnome_function
|
|
bindkey '\eOA' up-line-or-beginning-search
|
|
bindkey '\e[A' up-line-or-beginning-search
|
|
bindkey '\eOB' down-line-or-beginning-search
|
|
bindkey '\e[B' down-line-or-beginning-search
|
|
bindkey "\e[H" beginning-of-line # Début
|
|
bindkey "\e[F" end-of-line # Fin
|
|
zstyle ':completion:*:processes' command 'ps -ax'
|
|
zstyle ':completion:*:processes-names' command 'ps -aeo comm='
|
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
zstyle ':completion:*:*:kill:*' menu yes select
|
|
zstyle ':completion:*:*:killall:*:processes-names' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
|
zstyle ':completion:*:*:killall:*' menu yes select
|
|
|
|
# Fancy ctrl-z
|
|
fancy-ctrl-z () {
|
|
if [[ $#BUFFER -eq 0 ]]; then
|
|
bg
|
|
zle redisplay
|
|
else
|
|
zle push-input
|
|
fi
|
|
}
|
|
zle -N fancy-ctrl-z
|
|
bindkey '^Z' fancy-ctrl-z
|
|
|
|
|
|
zstyle ':completion:*:*:vim:*:*files' ignored-patterns '*.o|*.class|*.pdf|*.tar|*.tar.gz|main'
|
|
zstyle ':completion:*:*:vimcat:*:*files' ignored-patterns '*.o|*.class|*.pdf|*.tar|*.tar.gz|main'
|
|
zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \
|
|
/usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
|
|
zstyle ':completion:*:back:*' command-path /usr/local/sbin /usr/local/bin \
|
|
/usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
|
|
zstyle ':completion:*:optirun:*' command-path /usr/local/sbin /usr/local/bin \
|
|
/usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
|
|
|
|
# ctrl-s hang terminal disabled
|
|
stty -ixon
|