Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completion: Use native ZSH array pattern matching #645

Closed
wants to merge 1 commit into from

Commits on May 27, 2020

  1. completion: use native ZSH array pattern matching

    When clearing the builtin operations on re-sourcing in the ZSH case we
    can use the native ${parameters} associative array keys values to get
    the currently `__gitcomp_builtin_*` operations using pattern matching
    instead of using sed.
    
    As also stated in commit 94408dc, introducing this change the usage of
    sed has some overhead implications, while ZSH can do this check just
    using its native syntax.
    
    It's worth mention that this syntax can be sourced safely in bash
    without that its syntax checker would complain for an unsupported
    syntax.
    Tested in both bash 4.4 under linux and in macOs bash 3.2.57
    
    Tested-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
    Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
    3v1n0 committed May 27, 2020
    Configuration menu
    Copy the full SHA
    f670109 View commit details
    Browse the repository at this point in the history