X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=zsh%2Frc;h=ff59f86b59d30010062d43b6b720c847bda4c621;hb=843ce28bcb3395a862bdb8fef45203b284364e3c;hp=c1ee1d4aa2236ec8f3306fd230eb14b55336640f;hpb=37a28c07c5752711e5d1f4686a2b3f17d62ce3b7;p=config%2Fdotfiles.git diff --git a/zsh/rc b/zsh/rc index c1ee1d4..ff59f86 100644 --- a/zsh/rc +++ b/zsh/rc @@ -344,6 +344,11 @@ zshrc_longrun_preexec() { zshrc_resolve_fg_to_resumed_job_name $program program=$REPLY + # No background process found. + if [[ -z $program ]]; then + return + fi + # Don't track the time for certain (possible) long running processes which # need no automatic notification. for ignore in elinks man mutt vim; do @@ -768,7 +773,9 @@ zstyle ':completion:*:*:-command-:*' ignored-patterns './config.*' # Don't complete unwanted files with Vim. Thanks to Nomexous in #zsh on # Freenode (2010-06-06 04:54 CEST). See below for a way to complete them. zstyle ':completion:*:*:vim:*:all-files' ignored-patterns \ - '*.aux' '*.log' '*.pdf' \ + '*.aux' '*.log' '*.pdf' '*.bbl' '*.blg' '*.out' '*-blx.bib' '*.run.xml' \ + '*.o' \ + '*.pyc' \ '*.class' # Provide a fallback completer which always completes files. Useful when Zsh's @@ -783,6 +790,7 @@ compdef slocate=locate compdef srsync=rsync compdef srsync-incremental=rsync compdef svalgrind=valgrind +compdef sc=systemctl # CUSTOM ALIASES AND FUNCTIONS @@ -831,11 +839,14 @@ alias -g A1="| awk '{ print \$1 }'" alias -g A2="| awk '{ print \$2 }'" alias -g A3="| awk '{ print \$3 }'" alias -g G='| grep' +alias -g GB='| grep -vE "^Binary file .+ matches\$"' alias -g H='| head' alias -g P='| perl' alias -g S='| sort' +alias -g SL='| sort | less' alias -g T='| tail' alias -g U='| uniq' +alias -g X='`xsel -p || xclip -o`' # X selection # Make going up directories simple. alias -g ...='../..'