From 0761ae6020c1608990aba9c1fdcefb01e4f17247 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 7 Jul 2025 04:23:21 +0200 Subject: [PATCH] alias/function --- sh/code.sh | 15 +++++++++++++++ sh/main.sh | 1 + 2 files changed, 16 insertions(+) diff --git a/sh/code.sh b/sh/code.sh index 62f28a2..76487b9 100644 --- a/sh/code.sh +++ b/sh/code.sh @@ -79,6 +79,21 @@ rwx_code_aliases() { echo "${_rwx_code_aliases}" } +# find aliased 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 <