X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/043b866b7465b6abe49ba6b2ca209d6eebefb554..3b41df910f9e316e0f51d6bb10d01c0432ce0fb9:/dot/zshrc diff --git a/dot/zshrc b/dot/zshrc index 3cf00dc..a43697d 100644 --- a/dot/zshrc +++ b/dot/zshrc @@ -5,6 +5,9 @@ __mdw_shell=zsh case ${INSIDE_EMACS+t},$TERM in t,dumb) unsetopt zle ;; esac +###-------------------------------------------------------------------------- +### Common shell configuration. + . "$HOME/.shell-rc" ###-------------------------------------------------------------------------- @@ -12,12 +15,13 @@ case ${INSIDE_EMACS+t},$TERM in t,dumb) unsetopt zle ;; esac __mdw_set_prompt_hacks () { case $TERM in - linux*|screen*|xterm*|vt100*|eterm*) + linux*|screen*|xterm*|putty*|vt100*|eterm*) bold=%B unbold=%b gitcolour=%F{cyan} rccolour=%F{red} uncolour=%f ;; esac - host=%m dir=" %(6~!%-1~/.../%5~!%~)" + host=%m dir=" %(6~!%-1~/.../%4~!%~)" + more=%F{green}%_%f } if [ -t 0 ]; then @@ -66,8 +70,28 @@ bindkey "\e^l" down-case-word-shell bindkey "\ec" capitalize-word-bash bindkey "\e^c" capitalize-word-shell +bindkey "\e[1~" beginning-of-line "\e[4~" end-of-line + +bindkey -s "\eOQ" "/" "\eOR" "*" "\eOS" "-" +bindkey -s "\eOw" "7" "\eOx" "8" "\eOy" "9" +bindkey -s "\eOt" "4" "\eOu" "5" "\eOv" "6" "\eOk" "+" +bindkey -s "\eOq" "1" "\eOr" "2" "\eOs" "3" +bindkey -s "\eOp" "0" "\eOn" "."; bindkey "\eOM" accept-line + +bindkey -s "\eOQ" "/" "\eOR" "*" "\eOS" "-" +bindkey -s "\eOw" "7" "\eOx" "8" "\eOy" "9" +bindkey -s "\eOt" "4" "\eOu" "5" "\eOv" "6" "\eOk" "+" +bindkey -s "\eOq" "1" "\eOr" "2" "\eOs" "3" +bindkey -s "\eOp" "0" "\eOn" "."; bindkey "\eOM" accept-line + bindkey "\ep" history-beginning-search-backward bindkey "\en" history-beginning-search-forward +bindkey "\e," _history-complete-older + +for i in '!' '$' '@' '/' '~'; do + bindkey "\e$i" _bash_complete-word + bindkey "^X$i" _bash_list-choices +done setopt interactive_comments bindkey "\e#" pound-insert @@ -122,9 +146,11 @@ unsetopt bash_auto_list unsetopt beep setopt extendedglob unsetopt flow_control +unsetopt global_export +setopt glob_star_short setopt hist_ignore_all_dups setopt hist_ignore_space -setopt ksh_glob +unsetopt ksh_glob setopt list_ambiguous setopt list_packed setopt multios @@ -134,9 +160,12 @@ setopt notify setopt rc_expand_param setopt share_history +hash -d t=$TMPDIR + ###-------------------------------------------------------------------------- ### Finishing touches. +## Local tweaks. __mdw_source_if_exists "$HOME/.zshrc-local" ###----- That's all, folks --------------------------------------------------