From ca35935553d869d81ece0438e76633632fd707d8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Oct 2010 12:43:12 -0400 Subject: [PATCH 01/16] ENH: giturl -- determines tracked remote (if not origin), supports github * reverts to origin if remote could not be determined for the branch * BF: $REMOTE -> $remote * handles alioth.debian in addition to canonical git.debian --- .zsh/func/giturl | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.zsh/func/giturl b/.zsh/func/giturl index 9f96a5b..04f998f 100755 --- a/.zsh/func/giturl +++ b/.zsh/func/giturl @@ -7,14 +7,21 @@ # # Copyright © 2010 martin f. krafft # Released under the terms of the Artistic Licence 2.0 +# Contributions from Yaroslav O. Halchenko # # Source repository: git://git.madduck.net/etc/zsh.git # -local remote; remote=$(git config --get remote.origin.url) +local branch remote remote_name +branch=$(git symbolic-ref -q HEAD); branch="${branch#refs/heads/}" +# Obtain remote which current branch tracks, origin if not known +remote_name=$(git config branch.$branch.remote || echo origin) +remote=$(git config --get remote.$remote_name.url) -local part gitweb_base oldstyle -oldstyle=0 +local part gitweb_base style commitkw +style=gitweb +commitkw=commitdiff # keyword for commit -- differ for github +argssep=: # separator for arguments of the query case "$remote" in madduck:pub/*|ssh://git.madduck.net/madduck/pub/*) gitweb_base=http://git.madduck.net/v @@ -22,16 +29,27 @@ case "$remote" in part="${part#ssh://git.madduck.net/madduck/pub/}" part="${part%.git}.git" ;; - debian:*|*://git.debian.org/git/*|*@git.debian.org/git/*) + debian:*|*://git.debian.org/git/*|*://alioth.debian.org/git/*|*@git.debian.org/git/*) gitweb_base=http://git.debian.org part="${remote#debian:}" part="${part#*://git.debian.org/git/}" + part="${part#*://alioth.debian.org/git/}" part="${part#*@git.debian.org/git/}" part="${part%.git}.git" - oldstyle=1 + style=gitweb_old + ;; + github:*|*://github.com/*|*@github.com/*) + gitweb_base=http://github.com + part="${remote#github:}" + part="${part#*://github.com/}" + part="${part#*@github.com/}" + part="${part%.git}" + style=github + commitkw=commit + argssep= ;; *) - echo >&2 "E: I do not know how to translate $REMOTE into a gitweb URL." + echo >&2 "E: I do not know how to translate $remote into a gitweb URL." return 1 ;; esac @@ -39,17 +57,17 @@ esac local hash hash=$(git rev-parse HEAD) -case "$oldstyle" in - 0) +case "$style" in + gitweb|github) echo "$gitweb_base/$part" - echo "$gitweb_base/$part/commitdiff/$hash" + echo "$gitweb_base/$part/$commitkw/$hash" echo "$gitweb_base/$part/tree/HEAD" for i in $@; do - [ -f "$i" ] && echo "$gitweb_base/$part/blob/HEAD:/$i" - [ -d "$i" ] && echo "$gitweb_base/$part/tree/HEAD:/$i" + [ -f "$i" ] && echo "$gitweb_base/$part/blob/HEAD${argssep}/$i" + [ -d "$i" ] && echo "$gitweb_base/$part/tree/HEAD${argssep}/$i" done ;; - *) + gitweb_old) echo "$gitweb_base/?p=$part" echo "$gitweb_base/?p=$part;a=commitdiff;h=$hash" echo "$gitweb_base/?p=$part;a=tree;h=HEAD" -- 2.39.2 From 21df65ccf4d7dd7f5c498667fea1c2272cc2bfec Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Oct 2010 17:09:34 -0400 Subject: [PATCH 02/16] BF: giturl -- support SSH access URLs for github, i.e. git@github.com:ORGANIZATON/PROJECT --- .zsh/func/giturl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.zsh/func/giturl b/.zsh/func/giturl index 04f998f..171c4da 100755 --- a/.zsh/func/giturl +++ b/.zsh/func/giturl @@ -38,11 +38,11 @@ case "$remote" in part="${part%.git}.git" style=gitweb_old ;; - github:*|*://github.com/*|*@github.com/*) + github:*|*://github.com/*|*@github.com[/:]*) gitweb_base=http://github.com part="${remote#github:}" part="${part#*://github.com/}" - part="${part#*@github.com/}" + part="${part#*@github.com[:/]}" part="${part%.git}" style=github commitkw=commit -- 2.39.2 From dffaced336ebd944972a3bd0be6a5ab21905eff4 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 23 Feb 2011 10:39:02 +0100 Subject: [PATCH 03/16] tempfuncs can now incorporate a keyword into the file/dirname --- .zsh/zshrc/39_tempfuncs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.zsh/zshrc/39_tempfuncs b/.zsh/zshrc/39_tempfuncs index de2e232..0350925 100644 --- a/.zsh/zshrc/39_tempfuncs +++ b/.zsh/zshrc/39_tempfuncs @@ -9,13 +9,26 @@ # cdt () { - builtin cd $(mktemp -td cdt.XXXXXX) + builtin cd $(mktemp -td ${1:-cdt}.XXXXXX) pwd } vit () { - local tmpfile=$(mktemp -t vit.XXXXXX) - [ "$1" = '-' ] && cat >| $tmpfile + local prefix + for i in "$@"; do + case "$i" in + -) local stdin=1; shift;; + *) if [ -z "${prefix:-}" ]; then + prefix="$i"; shift + else + error "prefix already specified: $prefix" + return 1 + fi + ;; + esac + done + local tmpfile=$(mktemp -t ${prefix}.XXXXXX) + [ -n "$stdin" ] && cat >| $tmpfile sensible-editor $tmpfile /dev/tty echo $tmpfile } -- 2.39.2 From 910ef4f05663ec9859e25ccf26318128e56f4ee8 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 14 Mar 2011 19:58:24 +0100 Subject: [PATCH 04/16] initial checking of getpw --- .zsh/func/getpw | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 .zsh/func/getpw diff --git a/.zsh/func/getpw b/.zsh/func/getpw new file mode 100755 index 0000000..7d93e42 --- /dev/null +++ b/.zsh/func/getpw @@ -0,0 +1,82 @@ +#!/bin/sh +# +# func/getpw +# +# obtain a password from ~/pw.gpg +# +# Copyright © 2011 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: git://git.madduck.net/etc/zsh.git +# + +local PWENCFILE=${HOME}/pw.gpg +local incother=0 +local dest clip=1 +[ -x $(command -v xclip) ] || clip=0 + +OPTIND=0 +while getopts :po opt; do + case "$opt" in + \?) echo >&2 "E: unrecognised option: -$OPTARG"; return 1;; + p) clip=0;; + o) incother=1;; + esac +done +(( OPTIND > 1 )) && shift $(( OPTIND - 1 )) + +if [[ $clip = 1 ]]; then + dest='tr -d \\n | xclip -in' +else + dest="column -ts' '" +fi + +if (( $# == 1 )); then + case "$1" in + *@*) local identity="${1%@*}" + local resource="${1##*@}" + ;; + *) local resource="$1";; + esac +else + local resource="$1" + local identity="$2" +fi + +local IFSOLD="$IFS"; IFS=" " +local output +gpg --decrypt --batch --quiet "$PWENCFILE" | \ + { + output=$(while read r i p o; do + case "$r/$i" in + (*${resource}*/${identity:+*${identity}}*) + echo "$r $i $p $o";; + esac + done) + } +[ -z "$output" ] && return 0 + +typeset -al results +results=(${(f)output}) + +typeset -al result +if (( ${#results} == 1 )); then + result=(${(z)${results[1]}}) + output="${result[3]}" + [[ $incother = 1 ]] && output="$output ${result[4]}" + echo "$output" | eval $dest + [[ $clip = 1 ]] && echo >&2 "match for ${result[2]}@${result[1]} put onto X clipboard." +else + if [[ $clip = 1 ]]; then + echo >&2 "E: multiple matches, hence not putting onto clipboard; use -p option." + return 1 + fi + for r in $results; do + result=(${(z)r}) + output="${result[2]} ${result[3]}" + [[ $incother = 1 ]] && output="$output ${result[4]}" + echo "$output" + done | eval $dest +fi + +IFS="$IFSOLD" -- 2.39.2 From 3f60dca245acc7782d23e42f081bb4be4a050bbb Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 19 May 2011 15:03:50 +0200 Subject: [PATCH 05/16] fix quoting in getpw --- .zsh/func/getpw | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.zsh/func/getpw b/.zsh/func/getpw index 7d93e42..f3f1940 100755 --- a/.zsh/func/getpw +++ b/.zsh/func/getpw @@ -48,9 +48,9 @@ local output gpg --decrypt --batch --quiet "$PWENCFILE" | \ { output=$(while read r i p o; do - case "$r/$i" in - (*${resource}*/${identity:+*${identity}}*) - echo "$r $i $p $o";; + case "$r:l/$i:l" in + (*${resource:l}*/${identity:+*${identity:l}}*) + echo "'$r' '$i' '$p' '$o'";; esac done) } @@ -64,8 +64,8 @@ if (( ${#results} == 1 )); then result=(${(z)${results[1]}}) output="${result[3]}" [[ $incother = 1 ]] && output="$output ${result[4]}" - echo "$output" | eval $dest - [[ $clip = 1 ]] && echo >&2 "match for ${result[2]}@${result[1]} put onto X clipboard." + eval echo "$output" | eval $dest + [[ $clip = 1 ]] && eval echo >&2 "match for ${result[1]}, ID ${result[2]} put onto X clipboard." else if [[ $clip = 1 ]]; then echo >&2 "E: multiple matches, hence not putting onto clipboard; use -p option." @@ -73,7 +73,7 @@ else fi for r in $results; do result=(${(z)r}) - output="${result[2]} ${result[3]}" + output="${result[2]}@${result[1]} ${result[3]}" [[ $incother = 1 ]] && output="$output ${result[4]}" echo "$output" done | eval $dest -- 2.39.2 From 5dd6360b85a1010bb7dbf8f0b68ed5caeac0db07 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 19 May 2011 15:04:05 +0200 Subject: [PATCH 06/16] add ND/NF global aliases --- .zsh/zshrc/30_aliases | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index fd8dd24..982ddbb 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -53,6 +53,9 @@ cd () { __CHPWD_RUN_FIRST=lscontext && builtin cd "$@" && unset __CHPWD_RUN_FIRS # #183394 alias w='w|cat' +alias -g ND='*(/om[1])' # newest directory +alias -g NF='*(.om[1])' # newest file + alias egrep='egrep --color=auto -d skip' alias fgrep='fgrep --color=auto -d skip' alias grep='grep --color=auto -d skip' -- 2.39.2 From 6961cdf0ff4514130c20a9e9005d24b2aab1769a Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 19 May 2011 15:04:12 +0200 Subject: [PATCH 07/16] add larger font to termfonts --- .zsh/zshrc/80_termfonts | 1 + 1 file changed, 1 insertion(+) diff --git a/.zsh/zshrc/80_termfonts b/.zsh/zshrc/80_termfonts index 6baf75d..e8a1901 100644 --- a/.zsh/zshrc/80_termfonts +++ b/.zsh/zshrc/80_termfonts @@ -20,6 +20,7 @@ _XTERM_FONTS+=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1 #_XTERM_FONTS+=-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1 _XTERM_FONTS+=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1 _XTERM_FONTS+=-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1 +_XTERM_FONTS+='-*-lucidatypewriter-*-*-*-*-26-*-*-*-*-*-iso10646-1' _XTERM_FONT=${_XTERM_FONT:=1} _set_xterm_font() { -- 2.39.2 From f157c04d1fd31400e0d793914ec84d0498f0a315 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 08:48:21 +0200 Subject: [PATCH 08/16] default to cdt prefix in tempfuncs --- .zsh/zshrc/39_tempfuncs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh/zshrc/39_tempfuncs b/.zsh/zshrc/39_tempfuncs index 0350925..4b46a17 100644 --- a/.zsh/zshrc/39_tempfuncs +++ b/.zsh/zshrc/39_tempfuncs @@ -27,7 +27,7 @@ vit () { ;; esac done - local tmpfile=$(mktemp -t ${prefix}.XXXXXX) + local tmpfile=$(mktemp -t ${prefix:-vit}.XXXXXX) [ -n "$stdin" ] && cat >| $tmpfile sensible-editor $tmpfile /dev/tty echo $tmpfile -- 2.39.2 From a4a67ebe1362b5713ab5f36f79526ca763a4c246 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 08:49:30 +0200 Subject: [PATCH 09/16] hash apt archives dir --- .zsh/zshrc/20_dirhashes | 1 + 1 file changed, 1 insertion(+) diff --git a/.zsh/zshrc/20_dirhashes b/.zsh/zshrc/20_dirhashes index 943b8ba..ea1da70 100644 --- a/.zsh/zshrc/20_dirhashes +++ b/.zsh/zshrc/20_dirhashes @@ -10,5 +10,6 @@ hash -d doc=/usr/share/doc hash -d log=/var/log +hash -d deb=/var/cache/apt/archives # vim:ft=zsh -- 2.39.2 From 14b8c2d80836b331e0a68ce16df6640f98122f17 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 08:49:57 +0200 Subject: [PATCH 10/16] fix history-search-end --- .zsh/zshrc/80_bindkeys | 4 ---- .zsh/zshrc/80_zle | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.zsh/zshrc/80_bindkeys b/.zsh/zshrc/80_bindkeys index 1959bbd..28ea2ce 100644 --- a/.zsh/zshrc/80_bindkeys +++ b/.zsh/zshrc/80_bindkeys @@ -14,10 +14,6 @@ bindkey -e # history expansion on pressing space bindkey ' ' magic-space -# prefix search (up to cursor position) -bindkey '^xp' history-beginning-search-backward -bindkey '^xn' history-beginning-search-forward - # repeat the previous shell-word ($WORDCHARS) bindkey '\e=' copy-prev-shell-word diff --git a/.zsh/zshrc/80_zle b/.zsh/zshrc/80_zle index bdcdfd9..8dd36ef 100644 --- a/.zsh/zshrc/80_zle +++ b/.zsh/zshrc/80_zle @@ -23,4 +23,11 @@ _insert_datestamp() { LBUFFER+=${(%):-'%D{%Y.%m.%d}'}:; } zle -N insert-datestamp _insert_datestamp bindkey '^t' insert-datestamp +# prefix search (up to cursor position) +autoload history-search-end +zle -N history-beginning-search-backward-end history-search-end +zle -N history-beginning-search-forward-end history-search-end +bindkey "\e[5~" history-beginning-search-backward-end # PageUp +bindkey "\e[6~" history-beginning-search-forward-end # PageDown + # vim:ft=zsh -- 2.39.2 From 886931a360e62f6ce23b69f3342dbd8619f7f075 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 08:50:07 +0200 Subject: [PATCH 11/16] insert timestamp with esc-t --- .zsh/zshrc/80_zle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zsh/zshrc/80_zle b/.zsh/zshrc/80_zle index 8dd36ef..9439cae 100644 --- a/.zsh/zshrc/80_zle +++ b/.zsh/zshrc/80_zle @@ -21,7 +21,7 @@ bindkey '\ee' edit-command-line _insert_datestamp() { LBUFFER+=${(%):-'%D{%Y.%m.%d}'}:; } zle -N insert-datestamp _insert_datestamp -bindkey '^t' insert-datestamp +bindkey '\et' insert-datestamp # prefix search (up to cursor position) autoload history-search-end -- 2.39.2 From d2c85fde0cef18b2995bea5d96755dbc07f319a8 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 08:50:19 +0200 Subject: [PATCH 12/16] add insert-last-word keybinding --- .zsh/zshrc/80_zle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.zsh/zshrc/80_zle b/.zsh/zshrc/80_zle index 9439cae..ef211a8 100644 --- a/.zsh/zshrc/80_zle +++ b/.zsh/zshrc/80_zle @@ -30,4 +30,8 @@ zle -N history-beginning-search-forward-end history-search-end bindkey "\e[5~" history-beginning-search-backward-end # PageUp bindkey "\e[6~" history-beginning-search-forward-end # PageDown +_insert_last_typed_word() { zle insert-last-word -- 0 -1 }; +zle -N _insert_last_typed_word; +bindkey "\em" _insert_last_typed_word + # vim:ft=zsh -- 2.39.2 From 6b163efaf7e51a55c37f3604cca9988ea8a1786c Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 09:12:36 +0200 Subject: [PATCH 13/16] global alias L for less --- .zsh/zshrc/30_aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 982ddbb..89d2ca8 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -56,6 +56,8 @@ alias w='w|cat' alias -g ND='*(/om[1])' # newest directory alias -g NF='*(.om[1])' # newest file +alias -g L='|less' + alias egrep='egrep --color=auto -d skip' alias fgrep='fgrep --color=auto -d skip' alias grep='grep --color=auto -d skip' -- 2.39.2 From 3af2550f66b5c952a21e5c1649a538afb6f14a60 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 09:12:56 +0200 Subject: [PATCH 14/16] add insert-unicode-char --- .zsh/zshrc/80_zle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.zsh/zshrc/80_zle b/.zsh/zshrc/80_zle index ef211a8..05c094e 100644 --- a/.zsh/zshrc/80_zle +++ b/.zsh/zshrc/80_zle @@ -34,4 +34,8 @@ _insert_last_typed_word() { zle insert-last-word -- 0 -1 }; zle -N _insert_last_typed_word; bindkey "\em" _insert_last_typed_word +autoload insert-unicode-char +zle -N insert-unicode-char +bindkey '^Xi' insert-unicode-char + # vim:ft=zsh -- 2.39.2 From c551d987043662d8b7fbcdce42b12bac468f08bb Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 09:13:24 +0200 Subject: [PATCH 15/16] setopt longlistjobs --- .zsh/zshrc/99_TODO | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zsh/zshrc/99_TODO b/.zsh/zshrc/99_TODO index ae9af23..b0084ce 100644 --- a/.zsh/zshrc/99_TODO +++ b/.zsh/zshrc/99_TODO @@ -31,6 +31,8 @@ setopt no_bgnice setopt nohup # do alert me of running jobs before exiting setopt checkjobs +# display PID when suspending processes as well +setopt longlistjobs # disable backslashed escape sequences unless -e is given to echo setopt bsd_echo -- 2.39.2 From 29ff3db6dd936515eef1d15b34a42b6ffca4f4a5 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 3 Aug 2011 09:48:50 +0200 Subject: [PATCH 16/16] make zle abbreviations work --- .zsh/zshrc/30_aliases | 2 -- .zsh/zshrc/{80_bindkeys => 79_bindkeys} | 2 +- .zsh/zshrc/80_abbreviations | 36 +++++++++++++++++++++ .zsh/zshrc/{80_prompt => 85_prompt} | 0 .zsh/zshrc/{80_termfonts => 85_termfonts} | 0 .zsh/zshrc/{80_xtermtitle => 85_xtermtitle} | 0 6 files changed, 37 insertions(+), 3 deletions(-) rename .zsh/zshrc/{80_bindkeys => 79_bindkeys} (95%) create mode 100644 .zsh/zshrc/80_abbreviations rename .zsh/zshrc/{80_prompt => 85_prompt} (100%) rename .zsh/zshrc/{80_termfonts => 85_termfonts} (100%) rename .zsh/zshrc/{80_xtermtitle => 85_xtermtitle} (100%) diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 89d2ca8..982ddbb 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -56,8 +56,6 @@ alias w='w|cat' alias -g ND='*(/om[1])' # newest directory alias -g NF='*(.om[1])' # newest file -alias -g L='|less' - alias egrep='egrep --color=auto -d skip' alias fgrep='fgrep --color=auto -d skip' alias grep='grep --color=auto -d skip' diff --git a/.zsh/zshrc/80_bindkeys b/.zsh/zshrc/79_bindkeys similarity index 95% rename from .zsh/zshrc/80_bindkeys rename to .zsh/zshrc/79_bindkeys index 28ea2ce..5747a21 100644 --- a/.zsh/zshrc/80_bindkeys +++ b/.zsh/zshrc/79_bindkeys @@ -12,7 +12,7 @@ bindkey -e # history expansion on pressing space -bindkey ' ' magic-space +#bindkey ' ' magic-space # repeat the previous shell-word ($WORDCHARS) bindkey '\e=' copy-prev-shell-word diff --git a/.zsh/zshrc/80_abbreviations b/.zsh/zshrc/80_abbreviations new file mode 100644 index 0000000..06fc9a7 --- /dev/null +++ b/.zsh/zshrc/80_abbreviations @@ -0,0 +1,36 @@ +typeset -Ag abbreviations +abbreviations=( + '...' '../..' + '....' '../../..' + 'BG' '& exit' + 'C' '| wc' + 'G' '|& grep ' + 'H' '| head' + 'HL' ' --help |& less -r' + 'L' '| less' + 'LL' '|& less -r' + 'N' '&>/dev/null' + 'SL' '| sort | less' + 'S' '| sort -u' + 'T' '| tail' + 'V' '|& vim -' +) + +magic-abbrev-expand() { + local MATCH + LBUFFER=${LBUFFER%%(#m)[_a-zA-Z0-9]#} + LBUFFER+=${abbreviations[$MATCH]:-$MATCH} + zle self-insert +} + +no-magic-abbrev-expand() { + LBUFFER+=' ' +} + +zle -N magic-abbrev-expand +zle -N no-magic-abbrev-expand +bindkey " " magic-abbrev-expand +bindkey "^x " no-magic-abbrev-expand +bindkey -M isearch " " self-insert + +# vim:ft=zsh diff --git a/.zsh/zshrc/80_prompt b/.zsh/zshrc/85_prompt similarity index 100% rename from .zsh/zshrc/80_prompt rename to .zsh/zshrc/85_prompt diff --git a/.zsh/zshrc/80_termfonts b/.zsh/zshrc/85_termfonts similarity index 100% rename from .zsh/zshrc/80_termfonts rename to .zsh/zshrc/85_termfonts diff --git a/.zsh/zshrc/80_xtermtitle b/.zsh/zshrc/85_xtermtitle similarity index 100% rename from .zsh/zshrc/80_xtermtitle rename to .zsh/zshrc/85_xtermtitle -- 2.39.2