I have this:
foo(){
install_ores_gitflow;
command foo "$@"
}
export -f foo;
I am looking for something like this:
export foo(){
install_ores_gitflow;
command foo "$@"
}
but that syntax is not correct.
One technique I found is this: How to export all Bash functions in a file in one line?
so that means I could do this:
set -a;
foo(){
install_ores_gitflow;
command foo "$@"
}
set +a;
but I don't like that solution because the sourcing script could have set -a which means my script would override that which is very bad.
export -f foo?