This commit is contained in:
Marc Beninca 2025-07-08 20:37:33 +02:00
parent 23c0c18797
commit faeda4feb9
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 6 additions and 19 deletions

View file

@ -103,21 +103,6 @@ rwx_code_aliases() {
echo "${_rwx_code_aliases}"
}
# find alias function
rwx_code_alias_function() {
local target="${1}"
local line name
while IFS= read -r line; do
name="$(echo "${line}" | awk "{print \$1}")"
if [ "${name}" = "${target}" ]; then
echo "${line}" |
awk "{print \$2}"
fi
done <<EOF
${_rwx_code_aliases_functions}
EOF
}
# find command function
rwx_code_command_function() {
local target="${1}"
@ -204,9 +189,7 @@ rwx_code_load() {
# parse aliases functions
_rwx_code_aliases_functions="$(rwx_code_parse "aliases functions")"
while IFS= read -r line; do
text="$(echo "${line}" | sed "s| |() { |")"
text="${text} \"\${@}\"; }"
eval "${text}"
eval "${line}"
done <<EOF
${_rwx_code_aliases_functions}
EOF