commit fc74b0c8506d3455f7d08970714523c374cdf0f9
parent 7a85fbd0b62296a3bea878f83bad8981be684df0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 15 Mar 2019 10:27:49 +0100
Clean up .zshrc
Diffstat:
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/links/.zshrc b/links/.zshrc
@@ -7,20 +7,21 @@ debug_startup=false
# man zshoptions
setopt append_history # zsh sessions append their history to the hist file
-setopt autocd # cd into directory if called by name
setopt autopushd # make cd push the old dir to the dir stack
setopt extendedglob # globs (. is file, / is dir) see `man zshexpn`
setopt hist_ignore_dups # ignore duplicate cmds in history
-setopt histignorespace # dont store commands prefixed with space in history
+setopt histignorespace # don't store cmds prefixed with space in history
setopt interactivecomments # allow in-line comments in prompt
setopt prompt_subst # perform param exp, cmd subst, arith exp in prompt
setopt share_history # import new commands from the history file
+unsetopt autocd # cd into directory if called by name
unsetopt beep # beep on error
unsetopt hist_verify # verify before executing cmd from history (e.g. !!)
unsetopt notify # report status of bg jobs immediately
unsetopt nomatch # show error if wildcards do not match any files
-autoload -Uz add-zsh-hook cdr chpwd_recent_dirs compinit edit-command-line select-bracketed select-quoted zmv
+autoload -Uz add-zsh-hook cdr chpwd_recent_dirs compinit edit-command-line \
+ select-bracketed select-quoted zmv
compinit
add-zsh-hook chpwd chpwd_recent_dirs
@@ -32,7 +33,7 @@ zstyle :chpwd:* recent-dirs-pushd true
zle -N edit-command-line
zle -N select-bracketed
zle -N select-quoted
-#zle -N fzf-history-widget
+zle -N fzf-history-widget
zle -N history-substring-search-up
zle -N history-substring-search-down
@@ -46,7 +47,7 @@ set -o vi
bindkey -v
bindkey jk vi-cmd-mode
bindkey -M vicmd v edit-command-line
-#bindkey -a ? fzf-history-widget
+bindkey -a ? fzf-history-widget
bindkey -a k history-substring-search-up
bindkey -a j history-substring-search-down
bindkey '^R' history-incremental-search-backward
@@ -158,7 +159,6 @@ git_modified() {
fi
}
-
function prompt_with_vimode {
#echo -e "\a"
echo
@@ -203,12 +203,8 @@ else
. "$HOME/.config/fffs/lib/zsh/sources"
fi
-#### EXTRA COMMANDS
-# start ssh-agent
-# if [ -z "$SSH_AUTH_SOCK" ]; then
-# eval `ssh-agent` && ssh-add
-# fi > /dev/null 2>&1
+#### EXTRA COMMANDS
# pass **<tab>
_fzf_complete_pass() {
@@ -218,18 +214,12 @@ _fzf_complete_pass() {
find "$pwdir" -name "*.gpg" -print |
cut -c "$((stringsize + 1))"- |
sed -e 's/\(.*\)\.gpg/\1/'
- #sed -e 's/\/\(.*\)\.gpg/\1/'
)
}
. ~/.commands.sh
. ~/.locale
-# if [[ -o interactive ]]; then
-# function chpwd { ls }
-# fi
-
-[ -f ~/code/fzf-mpd/fzf-mpd.zsh ] && . ~/code/fzf-mpd/fzf-mpd.zsh
[ -f ~/.fzf.zsh ] && . ~/.fzf.zsh
# report startup diagnostics if requested