Allow passing arguments to functions

This commit is contained in:
2021-12-21 02:06:18 -08:00
parent bb695de69f
commit c7f7b0c6fb
4 changed files with 20 additions and 4 deletions

6
View File

@@ -2,8 +2,10 @@
main() {
redefine-functions-defined-with-selector-16
if [[ $(type -t "⚡$1") == "function" ]]; then
⚡$1
command="$1"
shift
if [[ $(type -t "⚡$command") == "function" ]]; then
⚡$command "$@"
else
⚡help
fi