Created
November 29, 2021 12:21
-
-
Save whiler/8c237c6b1351a000526d2a610c3ffdad to your computer and use it in GitHub Desktop.
rename bash shell function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvfunc() { | |
local original="$(declare -f $1)" | |
local newname="$2${original#$1}" | |
eval "${newname}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment