From 277c61f1819300462ec2791d6fee43ce3e4a85c2 Mon Sep 17 00:00:00 2001 From: CramMK Date: Mon, 15 Jun 2020 16:01:53 +0200 Subject: [PATCH] Some more zsh magic --- README.md | 2 +- dotfiles/zsh/zshrc | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8097795..0d05233 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ My personal configurations, managed with the 'dotdrop' submodule. ## Features + Distro: `Fedora 31` -+ Shell: `zsh + oh-my-zsh` ++ Shell: `zsh` + WM: `i3-gaps and i3` + Terminal: `xterm` + Font: `InconsolataLGC Nerd Font Mono (+ Inconsolata for text in polybar)` diff --git a/dotfiles/zsh/zshrc b/dotfiles/zsh/zshrc index e5ec8a0..a230cfd 100644 --- a/dotfiles/zsh/zshrc +++ b/dotfiles/zsh/zshrc @@ -13,11 +13,9 @@ export EDITOR="vim" export LANG="en_US.UTF-8" export PATH=$PATH:$HOME/.local/bin -## Enable ".." -setopt autocd autopushd - ## Aliases alias vimrc="vim ~/.vimrc" +alias zshrc="vim ~/.zshrc" alias dotf="cd ~/dotfiles/dotfiles" alias dotdrop="~/dotfiles/dotdrop.sh" --cfg="~/dotfiles/config.yaml" @@ -36,6 +34,15 @@ alias rm='rm -i' # Ask before removal alias cp='cp -i' # Ask before removal alias mv='mv -i' # Ask before removal +alias gaa="git add ." +alias gst="git status" +alias gc="git commit -v" +alias gc!="git commit -v --amend" +alias gl="git pull" +alias gp="git push" +alias glog="git log --oneline --decorate --graph" + + ## Local Aliases if [ -f ~/.zshrc_local ]; then source ~/.zshrc_local @@ -49,6 +56,19 @@ setopt complete_in_word setopt always_to_end zstyle ':completion:*' menu select +# Case Insensitive completion +zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + +autoload -Uz compinit + +for dump in ~/.zcompdump(N.mh+24); do + compinit +done +compinit -C + +## Directory navigation +setopt autocd autopushd + ## History command configuration setopt extended_history # record timestamp of command in HISTFILE setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE