X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/e45b0db3d66ca9e041622db3d801d026fb4d3724..33230b65afa1076218abff057d0bbcc7486af0a8:/.zsh/zshrc/80_abbreviations diff --git a/.zsh/zshrc/80_abbreviations b/.zsh/zshrc/80_abbreviations deleted file mode 100644 index cae9274..0000000 --- a/.zsh/zshrc/80_abbreviations +++ /dev/null @@ -1,36 +0,0 @@ -typeset -Ag abbreviations -abbreviations=( - '...' '../..' - '....' '../../..' - 'BG' '& exit' - 'WC' '| wc' - 'GR' '|& grep ' - 'HD' '| head' - 'HL' ' --help |& less -r' - 'LS' '| less' - 'LR' '|& less -r' - 'NL' '&>/dev/null' - 'SL' '| sort | less' - 'SU' '| sort -u' - 'TL' '| tail' - 'VI' '|& 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