Add optional param sep in mimic_shell_completion, use in format_shell_completion