From 228b07462aca829ae05735782a02a4b8059c1da4 2013-11-13 19:26:37 From: Paul Ivanov Date: 2013-11-13 19:26:37 Subject: [PATCH] bash completion: subcmds get a trailing space thanks to @juliantaylor for providing the patch --- diff --git a/examples/core/ipython-completion.bash b/examples/core/ipython-completion.bash index f9a56de..6b34a67 100644 --- a/examples/core/ipython-completion.bash +++ b/examples/core/ipython-completion.bash @@ -103,7 +103,9 @@ EOF COMPREPLY=( $(compgen -W "${__ipython_complete_profiles}" -- ${cur}) ) else if [ "$COMP_CWORD" == 1 ]; then - COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) ) + local IFS=$'\t\n' + local sub=$(echo $subcommands | sed -e "s/ / \t/g") + COMPREPLY=( $(compgen -W "${sub}" -- ${cur}) ) else COMPREPLY=( $(compgen -f -- ${cur}) ) fi