Don't put functions in profile.d (or add an export -f to export them)
Created by: tpavlic
This issue is related to issue #256 (closed). The autojump that is included in distributions like ArchLinux puts autojump.bash in /etc/profile.d/. This works great only if you are sure to use a login shell (e.g., by logging in via a real terminal). If you instead login to X11 and then fire off a terminal (inside Terminal or yakuake or whatever), all of the functions defined in /etc/profile.d/ will be masked by the child shell process that is not a login shell. The environment variables carry over, but the functions do not.
For this reason, autojump.bash might be better suited for /etc/bash_completion.d. Alternatively, stub scripts (or symlinks) for j, jo, jc, etc. could be used instead of the functions.
Another option, as @saamalik points out, is to use "export -f" to export the functions in the profile.d script.