This commit is contained in:
parent
3b222fda83
commit
967e17e224
1 changed files with 12 additions and 3 deletions
15
sh/code.sh
15
sh/code.sh
|
@ -200,10 +200,8 @@ rwx_code_doc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rwx_code_load() {
|
rwx_code_load() {
|
||||||
# parse aliases
|
|
||||||
_rwx_code_aliases="$(rwx_code_parse "aliases")"
|
|
||||||
# parse aliases functions
|
|
||||||
local line text
|
local line text
|
||||||
|
# parse aliases functions
|
||||||
_rwx_code_aliases_functions="$(rwx_code_parse "aliases functions")"
|
_rwx_code_aliases_functions="$(rwx_code_parse "aliases functions")"
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
text="$(echo "${line}" | sed "s| |() { |")"
|
text="$(echo "${line}" | sed "s| |() { |")"
|
||||||
|
@ -212,6 +210,17 @@ rwx_code_load() {
|
||||||
done <<EOF
|
done <<EOF
|
||||||
${_rwx_code_aliases_functions}
|
${_rwx_code_aliases_functions}
|
||||||
EOF
|
EOF
|
||||||
|
# parse commands functions
|
||||||
|
_rwx_code_commands_functions="$(rwx_code_parse "commands functions")"
|
||||||
|
while IFS= read -r line; do
|
||||||
|
text="$(echo "${line}" | sed "s| |() { |")"
|
||||||
|
text="${text} \"\${@}\"; }"
|
||||||
|
eval "${text}"
|
||||||
|
done <<EOF
|
||||||
|
${_rwx_code_commands_functions}
|
||||||
|
EOF
|
||||||
|
# parse aliases
|
||||||
|
_rwx_code_aliases="$(rwx_code_parse "aliases")"
|
||||||
# parse binaries
|
# parse binaries
|
||||||
_rwx_code_binaries="$(rwx_code_parse "binaries")"
|
_rwx_code_binaries="$(rwx_code_parse "binaries")"
|
||||||
# parse commands
|
# parse commands
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue