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}"
|
echo "${_rwx_code}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# show the cached aliases
|
||||||
|
#= rcac
|
||||||
|
rwx_code_aliases_commands() {
|
||||||
|
echo "${_rwx_code_aliases_commands}"
|
||||||
|
}
|
||||||
|
|
||||||
# show the cached constants
|
# show the cached constants
|
||||||
#= rcc
|
#= rcc
|
||||||
rwx_code_constants() {
|
rwx_code_constants() {
|
||||||
|
|
|
@ -204,9 +204,9 @@ ${RWX_REGEX_BEGIN}\\(${RWX_REGEX_VARIABLE}\\)${RWX_REGEX_SET}"
|
||||||
_rwx_code_variables=""
|
_rwx_code_variables=""
|
||||||
|
|
||||||
rwx_parse_code() {
|
rwx_parse_code() {
|
||||||
# parse aliases
|
# parse aliases commands
|
||||||
local line text
|
local line text
|
||||||
RWX_ALIASES="$(rwx_parse_aliases)"
|
_rwx_code_aliases_commands="$(rwx_parse_aliases_commands)"
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
text="$(echo "${line}" | sed "s| |() { |")"
|
text="$(echo "${line}" | sed "s| |() { |")"
|
||||||
text="${text} \"\${@}\"; }"
|
text="${text} \"\${@}\"; }"
|
||||||
|
@ -221,7 +221,7 @@ EOF
|
||||||
# parse variables
|
# parse variables
|
||||||
_rwx_code_variables="$(rwx_parse_variables)"
|
_rwx_code_variables="$(rwx_parse_variables)"
|
||||||
}
|
}
|
||||||
rwx_parse_aliases() {
|
rwx_parse_aliases_commands() {
|
||||||
printf "%s" "${_rwx_code}" |
|
printf "%s" "${_rwx_code}" |
|
||||||
awk \
|
awk \
|
||||||
--assign action="alias" \
|
--assign action="alias" \
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
# self
|
# self
|
||||||
# module
|
# module
|
||||||
|
|
||||||
# show the cached aliases
|
|
||||||
#= rca
|
|
||||||
rwx_code_aliases() {
|
|
||||||
echo "${RWX_ALIASES}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# meta doc
|
# meta doc
|
||||||
#= rd
|
#= rd
|
||||||
rwx_doc() {
|
rwx_doc() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue