diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-03-14 22:52:04 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-03-14 22:52:04 +0100 |
commit | 36792140d09bf3661dfc0940b8f86620eac89108 (patch) | |
tree | 46b002acccfd2424fa3a197bc08e3f2e24848813 /completion.py | |
parent | 98f79613ffbccf43b9f930339c7e3372dfe52b56 (diff) | |
download | clufter-36792140d09bf3661dfc0940b8f86620eac89108.tar.gz clufter-36792140d09bf3661dfc0940b8f86620eac89108.tar.xz clufter-36792140d09bf3661dfc0940b8f86620eac89108.zip |
completion: fix hardcoding '_main_boostrap_' function part
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'completion.py')
-rw-r--r-- | completion.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/completion.py b/completion.py index c2b0d97..7e61602 100644 --- a/completion.py +++ b/completion.py @@ -105,6 +105,7 @@ local opts="{0}" alias_case = ' ' + '\n '.join( '{0}) cur="{1}";;'.format(alias, to) for alias, to in aliases ) + # usage of self._name: see self._namespaced_identifier main = \ r"""local commands="{1}" local opts_common="{2}" @@ -120,7 +121,7 @@ while true; do case ${{cur}} in {5} esac - fnc=_main_boostrap_${{cur/-/_}} + fnc=_{0}_${{cur/-/_}} declare -f ${{fnc}} >/dev/null && COMPREPLY+=( $(${{fnc}} $2) ) [[ "$2" =~ -.* ]] \ && COMPREPLY+=( $(compgen -W "${{opts_common}} ${{opts_nonmain}}" -- $2) ) |