From afa6754c4730a2b19ee7e3b33467e0456154cb68 Mon Sep 17 00:00:00 2001 From: jep-dev Date: Wed, 1 Feb 2017 16:37:32 -0500 Subject: [PATCH] Fixed alias_value for aliases with hyphens and other characters --- lib/functions.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index f3065378..2bc6f035 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -52,8 +52,8 @@ function open_command() { # 1 if it does not exist # function alias_value() { - alias "$1" | sed "s/^$1='\(.*\)'$/\1/" - test $(alias "$1") + local val=$(alias "$1") + test -n "$val" && echo "${val//^$1='\(.*\)'/\1/}" } #