diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-03-14 22:54:16 +0100 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-03-14 22:54:16 +0100 |
commit | d03638cff10636995c5c29a4120f031fbc77fc6c (patch) | |
tree | f59026685a3190c8d9a61e5c4858e250536fd578 /completion.py | |
parent | 36792140d09bf3661dfc0940b8f86620eac89108 (diff) | |
download | clufter-d03638cff10636995c5c29a4120f031fbc77fc6c.tar.gz clufter-d03638cff10636995c5c29a4120f031fbc77fc6c.tar.xz clufter-d03638cff10636995c5c29a4120f031fbc77fc6c.zip |
completion: [['s regex needs explicit start boundary
(haven't expected that, oops)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'completion.py')
-rw-r--r-- | completion.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/completion.py b/completion.py index 7e61602..5a39aba 100644 --- a/completion.py +++ b/completion.py @@ -116,14 +116,14 @@ local cur fnc i=${{COMP_CWORD}} while true; do test ${{i}} -eq 0 && break || let i-=1 cur=${{COMP_WORDS[${{i}}]}} - [[ "${{cur}}" =~ -.* ]] && continue + [[ "${{cur}}" =~ ^-.* ]] && continue # handle aliases case ${{cur}} in {5} esac fnc=_{0}_${{cur/-/_}} declare -f ${{fnc}} >/dev/null && COMPREPLY+=( $(${{fnc}} $2) ) - [[ "$2" =~ -.* ]] \ + [[ "$2" =~ ^-.* ]] \ && COMPREPLY+=( $(compgen -W "${{opts_common}} ${{opts_nonmain}}" -- $2) ) return done |