tweaking zsh

This commit is contained in:
Harri Lahtinen 2018-12-07 12:24:19 +02:00
parent a8b5f6c262
commit 5fdb8980d2
1 changed files with 33 additions and 7 deletions

40
.zshrc
View File

@ -32,7 +32,36 @@ ZSH_THEME="spaceship"
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
#HYPHEN_INSENSITIVE="true"
# Auto completion
autoload -Uz compinit
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
if [ $(date +'%j') != $updated_at ]; then
compinit -i
else
compinit -C -i
fi
# Load complist module
zmodload -i zsh/complist
# Save history
HISTFILE=$HOME/.zsh_history
HISTSIZE=100000
SAVEHIST=$HISTSIZE
# No duplicates in history
setopt hist_ignore_all_dups # remove older duplicate entries from history
setopt hist_reduce_blanks # remove superfluous blanks from history items
setopt inc_append_history # save history entries as soon as they are entered
setopt share_history # share history between different instances of the shell
# Auto correction
setopt correct_all # autocorrect commands
setopt auto_list # automatically list choices on ambiguous completion
setopt auto_menu # automatically use menu completion
setopt always_to_end # move cursor to end if word had one match
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
@ -47,7 +76,7 @@ ZSH_THEME="spaceship"
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
#ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
@ -69,7 +98,7 @@ ZSH_THEME="spaceship"
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(docker helm kube-ps1 kubectl gpg-agent git archlinux battery tmux extract yadm web-search)
plugins=(docker helm kube-ps1 kubectl gpg-agent git zsh-autosuggestions zsh-syntax-highlighting archlinux battery tmux extract yadm web-search)
source $ZSH/oh-my-zsh.sh
@ -136,10 +165,7 @@ eval "$(fasd --init auto)"
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias openskylab="sudo openvpn ~/.openvpn/OPNsense-udp-1194-config.ovpn"
#alias ycommit="yadm commit -av"
#alias ypush="yadm push -u origin master"
alias reload="source ~/.zshrc"
alias func="source ~/.zfunc/functions.zsh"
alias torrent="transmission-remote -n 'transmission:transmission' -a"
alias mirror="sudo reflector --protocol https --latest 50 --number 20 --sort rate --save /etc/pacman.d/mirrorlist"
alias v="f -e nvim" #quick opening files with vim
@ -150,10 +176,10 @@ alias play="ncmpcpp -S visualizer"
alias userkey="gpg --search-keys"
alias wspeedd="speedometer -rx wlp11s0"
alias wspeedu="speedometer -tx wlp11s0"
alias update="packer -Syyu --noconfirm"
alias edis='expressvpn disconnect && sudo cp ~/resolv.conf /etc/resolv.conf'
alias aws1='ssh ubuntu@ec2-18-196-102-236.eu-central-1.compute.amazonaws.com'
alias gcp='gcloud compute ssh instance-1'
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# The next line updates PATH for the Google Cloud SDK.