I came across a bash_profile file that makes use of the export -f statement in the following manner:
# Run xelatex and BibTeX
function xelatex_bibtex {
xelatex -shell-escape "${1}.tex" &&
bibtex "${1}" &&
xelatex -shell-escape "${1}.tex" &&
xelatex -shell-escape "${1}.tex"
}
export -f xelatex_bibtex
However, functions defined without export -f seem to work perfectly fine:
# Search for synonyms
function syn {
wn "${1}" -synsn
}
What's the role of export -f and what's considered good practice when creating convenience function in bash_profile with respect to using export?