dotfiles/zsh/config.zsh

92 lines
3.1 KiB
Bash
Raw Normal View History

2016-12-02 09:16:54 +01:00
# Check if zshrc has been modified
# I like jokes, but I prefer when I'm the one who makes them
2016-12-08 22:23:07 +01:00
# 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
2016-08-22 12:04:24 +02:00
# 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"
2024-06-21 17:28:36 +02:00
if [ -z $TERMINAL_UUID ]; then
export TERMINAL_UUID=$(uuidgen)
fi
echo -en "\e]2;$TERMINAL_UUID\a"
2016-08-22 12:04:24 +02:00
# 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)
2023-02-16 14:28:41 +01:00
plugins=(git myjump pass $ZSH_EXTRA_PLUGINS)
2024-05-21 10:33:41 +02:00
zstyle ':omz:alpha:lib:git' async-prompt no
2016-08-22 12:04:24 +02:00
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
2019-10-01 16:36:01 +02:00
# ctrl-s hang terminal disabled
stty -ixon