> never > thought of using a shell function in .profile till I read this thread.
Maybe redundant but worth checking ksh(1), and search for kshrc, right after the description and arguments. The section (ENV parameter) describes strategy to keep your .profile cleaner for login shells and interactive shells related setup in .kshrc. So, you may want to put majority of your aliases and functions etc in $HOME/.kshrc and this in $HOME/.profile export ENV=$HOME/.kshrc It is again repetitive of previous posts but there is no need to pollute /etc/profile, rather recommended to put these in $HOME dot files for various reasons, the principle of least applied change at the lowest possible level. Functions has always been impressive once you move past the alias shortcomings (can't handle arguments etc), so also worth a read the "Functions" section. Check also the FILES section for places you can put appropriate respective customisation. I've found this man page ksh(1) more helpful than books on shells programming. This applies to many other man pages in OpenBSD, which is not only impressive, but really helpful and saves time.

