diff --git a/sh/code.sh b/sh/code.sh index 59c9bb5..54682bc 100644 --- a/sh/code.sh +++ b/sh/code.sh @@ -11,6 +11,12 @@ rwx_code() { echo "${_rwx_code}" } +# show the cached aliases +#= rcac +rwx_code_aliases_commands() { + echo "${_rwx_code_aliases_commands}" +} + # show the cached constants #= rcc rwx_code_constants() { diff --git a/sh/main.sh b/sh/main.sh index e40ea7a..0295692 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -204,9 +204,9 @@ ${RWX_REGEX_BEGIN}\\(${RWX_REGEX_VARIABLE}\\)${RWX_REGEX_SET}" _rwx_code_variables="" rwx_parse_code() { - # parse aliases + # parse aliases commands local line text - RWX_ALIASES="$(rwx_parse_aliases)" + _rwx_code_aliases_commands="$(rwx_parse_aliases_commands)" while IFS= read -r line; do text="$(echo "${line}" | sed "s| |() { |")" text="${text} \"\${@}\"; }" @@ -221,7 +221,7 @@ EOF # parse variables _rwx_code_variables="$(rwx_parse_variables)" } -rwx_parse_aliases() { +rwx_parse_aliases_commands() { printf "%s" "${_rwx_code}" | awk \ --assign action="alias" \ diff --git a/sh/self.sh b/sh/self.sh index 46db7c7..0588991 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -1,12 +1,6 @@ # self # module -# show the cached aliases -#= rca -rwx_code_aliases() { - echo "${RWX_ALIASES}" -} - # meta doc #= rd rwx_doc() {