help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling a function with a shorter name


From: michael-franzese
Subject: Calling a function with a shorter name
Date: Wed, 14 Apr 2021 03:52:21 +0200

Have written a function with a long name.  I want to use it with a very short
name somewhere else to improve readability.  Have looked into the command alias,
but I get "command not found" when I call the shorter version.

----- tools.sh -----
chtcolr () { ... }
alias ct='chtcolr'
----- tools.sh -----

----- test.sh -----
source ./tools.sh
ct $a $b
----- test.sh -----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]