bash completion and functions