code/aliases_commands
This commit is contained in:
parent
7d400d9031
commit
e157a1ecf7
3 changed files with 9 additions and 9 deletions
|
@ -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() {
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
# self
|
||||
# module
|
||||
|
||||
# show the cached aliases
|
||||
#= rca
|
||||
rwx_code_aliases() {
|
||||
echo "${RWX_ALIASES}"
|
||||
}
|
||||
|
||||
# meta doc
|
||||
#= rd
|
||||
rwx_doc() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue