diff --git a/cd.sh b/cd.sh index ecb9f92..561dc0e 100644 --- a/cd.sh +++ b/cd.sh @@ -686,14 +686,14 @@ local path="${1}" } cd_sed () { -local expression -local file="${1}" -shift - if [ -f "${file}" ] ; then - cd_cat "${file}" - for expression in "${@}" ; do - sed --in-place "s${expression}g" "${file}" \ - && cd_cat "${file}" \ + cd_sed__file="${1}" + shift + # + if [ -f "${cd_sed__file}" ] ; then + cd_cat "${cd_sed__file}" + for cd_sed__regex in "${@}" ; do + sed --in-place "s${cd_sed__regex}g" "${cd_sed__file}" \ + && cd_cat "${cd_sed__file}" \ || exit done fi