From: Yaroslav Halchenko Date: Tue, 18 Oct 2011 21:37:49 +0000 (-0400) Subject: abbreviations are not preceeded by - X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/489c186c295005acd6c007327e2ea843e320dfd3?ds=inline abbreviations are not preceeded by - Hi Martin, please consider another 1 byte patch ;) with recently added abbreviations I found myself cursing too often while typing smth like dpkg -L ... so I augmented magic-abbrev-expand to include "-" into the "last word"... patch is attached Cheers -- Yaroslav O. Halchenko Postdoctoral Fellow, Department of Psychological and Brain Sciences Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755 Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419 WWW: http://www.linkedin.com/in/yarik --- diff --git a/.zsh/zshrc/80_abbreviations b/.zsh/zshrc/80_abbreviations index e517d6c..cae9274 100644 --- a/.zsh/zshrc/80_abbreviations +++ b/.zsh/zshrc/80_abbreviations @@ -18,7 +18,7 @@ abbreviations=( magic-abbrev-expand() { local MATCH - LBUFFER=${LBUFFER%%(#m)[_a-zA-Z0-9]#} + LBUFFER=${LBUFFER%%(#m)[-_a-zA-Z0-9]#} LBUFFER+=${abbreviations[$MATCH]:-$MATCH} zle self-insert }