Updated to latest version

Latest version of git-escape magic now escapes the @ shortcut for HEAD.
This commit is contained in:
Matthew Turney 2014-11-05 08:18:28 -06:00 committed by Matthew Turney
parent 3ed1e55178
commit b5e1000a37
No known key found for this signature in database
GPG Key ID: 0FC06F79FAA020CF

View File

@ -2,7 +2,7 @@
# #
# git-escape-magic - zle tweak for git command line arguments # git-escape-magic - zle tweak for git command line arguments
# #
# Copyright (c) 2011, 2012 Akinori MUSHA # Copyright (c) 2011, 2012, 2014 Akinori MUSHA
# Licensed under the 2-clause BSD license. # Licensed under the 2-clause BSD license.
# #
# This tweak eliminates the need for manually escaping shell # This tweak eliminates the need for manually escaping shell
@ -81,9 +81,7 @@ git-escape-magic.self-insert() {
[[ $words[(i)--] -gt $#words ]] ;; [[ $words[(i)--] -gt $#words ]] ;;
esac && esac &&
case "${words[-1]%%"$KEYS"}" in case "${words[-1]%%"$KEYS"}" in
(*@) (*[@^])
[[ "$KEYS" == \{* ]] ;;
(*\^)
[[ "$KEYS" == [{~^]* ]] ;; [[ "$KEYS" == [{~^]* ]] ;;
(*[@^]\{[^}]##) (*[@^]\{[^}]##)
[[ "$KEYS" == \}* ]] ;; [[ "$KEYS" == \}* ]] ;;
@ -134,3 +132,4 @@ git-escape-magic() {
} }
[[ -o kshautoload ]] || git-escape-magic "$@" [[ -o kshautoload ]] || git-escape-magic "$@"