summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorDaniel Holman <dholman@gymli.org>2017-06-24 00:23:30 -0500
committerDaniel Holman <dholman@gymli.org>2017-06-24 00:23:30 -0500
commitd1facc7b92cfc2a938181a5fa5bb739d9a4b34ce (patch)
treed50f9d0553c4063cdcd28bf17a1a6cc09b05e1f7 /.zshrc
parent7d4364293a4c81e9aa94e7dca320dd550b44a358 (diff)
Added completion options among other things
Added a few completion options and some other useful things to .zsh
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc28
1 files changed, 26 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index ccc7d7a..1d6734a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -7,7 +7,7 @@ unsetopt autocd beep nomatch
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
-zstyle :compinstall filename '/home/dsh/.zshrc'
+zstyle :compinstall filename '/home/dholman/.zshrc'
autoload -Uz compinit
compinit
@@ -15,10 +15,21 @@ compinit
PROMPT="$ "
+# Additional completion options
+zstyle ':completion:*' use-cache on
+zstyle ':completion:*:cd:*' ignore-parents parent pwd
+zstyle ':completion:*' completer _complete _match _approximate
+zstyle ':completion:*match:*' original only
+zstyle ':completion:*approximate:*' max-errors 1 numeric
+zstyle ':completion:*:*:kill:*' menu yes select
+zstyle ':completion:*:kill:*' force-list always
+zstyle ':completion:*' squeeze-slashes true
+
source /usr/share/doc/pkgfile/command-not-found.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
+# Vim-style history searching
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
@@ -28,10 +39,13 @@ alias pacr="pacaur -Rs"
alias pacup="pacaur -Syu"
alias pacsearch="pacaur -Ss"
-export PATH="$PATH:/home/dsh/bin"
+export PATH="$PATH:/home/dholman/bin"
export EDITOR="vim"
+export SUDO_EDITOR="rvim"
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
+export GPGKEY=90D8F8E2C830F6129B2FBB1133836B30AA014B82
+# Make shell stuff behave nicely
man() {
env \
LESS_TERMCAP_mb=$'\e[01;31m' \
@@ -43,3 +57,13 @@ man() {
LESS_TERMCAP_us=$'\e[01;32m' \
man "$@"
}
+
+rationalise-dot() {
+ if [[ $LBUFFER = *.. ]]; then
+ LBUFFER+=/..
+ else
+ LBUFFER+=.
+ fi
+}
+zle -N rationalise-dot
+bindkey . rationalise-dot