Utility functions for bashprompt plugins.