diff --git a/cd.sh b/cd.sh index 8c7e9c9..bb50c68 100644 --- a/cd.sh +++ b/cd.sh @@ -626,10 +626,10 @@ local variable="${1}" } cd_grep_os () { -local variable="${1}" - if [ "${variable}" ] ; then - grep "^${variable}=" "/etc/os-release" \ - | sed "s|^${variable}=||" \ + cd_grep_os__variable="${1}" + if [ "${cd_grep_os__variable}" ] ; then + grep "^${cd_grep_os__variable}=" "/etc/os-release" \ + | sed "s|^${cd_grep_os__variable}=||" \ | sed "s|^\"\(.*\)\"$|\1|" fi }