alias/function
This commit is contained in:
parent
47ff6043d5
commit
0761ae6020
2 changed files with 16 additions and 0 deletions
15
sh/code.sh
15
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 <<EOF
|
||||
${_rwx_code_aliases_functions}
|
||||
EOF
|
||||
}
|
||||
|
||||
# show the cached aliases and functions
|
||||
#= rcaf
|
||||
rwx_code_aliases_functions() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue