Fixed alias_value for aliases with hyphens and other characters
This commit is contained in:
parent
d2725d44fc
commit
afa6754c47
@ -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/}"
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user