Created
December 31, 2010 00:50
-
-
Save hchbaw/760562 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 950f3a97678690306c46855e4aac887b7a80c53b Mon Sep 17 00:00:00 2001 | |
From: Takeshi Banse <[email protected]> | |
Date: Fri, 31 Dec 2010 09:45:30 +0900 | |
Subject: [PATCH] Fix for some aliased commands | |
It seems that some aliases which contain some hyphens yeild an error. | |
% alias l='ls -sF --color=auto' | |
% l | |
_zsh_highlight-zle-buffer:local:16: not valid in this context: -sF | |
Signed-off-by: Takeshi Banse <[email protected]> | |
--- | |
zsh-syntax-highlighting.zsh | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh | |
index 49811ba..11c1ccc 100644 | |
--- a/zsh-syntax-highlighting.zsh | |
+++ b/zsh-syntax-highlighting.zsh | |
@@ -111,7 +111,7 @@ _zsh_highlight-zle-buffer() { | |
case $res in | |
*': reserved') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[reserved-word];; | |
*': alias') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[alias] | |
- local aliased_command=${$(alias $arg)#*=} | |
+ local aliased_command=${"$(alias $arg)"#*=} | |
[[ ${${ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS[(r)$aliased_command]:-}:+yes} = 'yes' ]] && ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS+=($arg) | |
;; | |
*': builtin') style=$ZSH_SYNTAX_HIGHLIGHTING_STYLES[builtin];; | |
-- | |
1.7.3.2.451.g1c2ab | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment