Fixed alias_value for aliases with hyphens and other characters

This commit is contained in:
jep-dev 2017-02-01 16:37:32 -05:00 committed by John Petersen
parent d2725d44fc
commit afa6754c47

View File

@ -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/}"
}
#