diff options
| author | dana <dana@dana.is> | 2026-07-09 16:03:35 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2026-07-09 16:23:36 -0500 |
| commit | 5c4f586ca0ad012953888979b01705699e8429ac (patch) | |
| tree | edef063256a4048d6286f1c825815ee5dc0b4d9c /Completion/Unix/Command | |
| parent | unposted: completion: remove _mac_files_for_application (diff) | |
| download | zsh-5c4f586ca0ad012953888979b01705699e8429ac.tar zsh-5c4f586ca0ad012953888979b01705699e8429ac.tar.gz zsh-5c4f586ca0ad012953888979b01705699e8429ac.tar.bz2 zsh-5c4f586ca0ad012953888979b01705699e8429ac.tar.lz zsh-5c4f586ca0ad012953888979b01705699e8429ac.tar.xz zsh-5c4f586ca0ad012953888979b01705699e8429ac.tar.zst zsh-5c4f586ca0ad012953888979b01705699e8429ac.zip | |
unposted: _grep: fix freebsd grep variant pattern
oliver shared a user report that grep completion doesn't work properly
on macos any more. this is because it no longer uses gnu grep -- it's
been freebsd grep since at least 2019
there appear to be other inaccuracies in this function which we should
revisit, but this will solve the issue as reported
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_grep | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_grep b/Completion/Unix/Command/_grep index 0f1e712fd..120d1feea 100644 --- a/Completion/Unix/Command/_grep +++ b/Completion/Unix/Command/_grep @@ -68,7 +68,9 @@ arguments+=( '(-)--help[display help information]' ) -_pick_variant -r variant -c "$command" gnu=gnu gpl2=2.5.1 unix --version +_pick_variant -r variant -c "$command" \ + gnu=gnu gpl2='(2.5.1|GNU compatible)' unix --version + case $variant:$OSTYPE in (gnu:*|gpl2:freebsd*)) [[ $service != (|g|z|gz|bz)[ef]grep ]] && arguments+=( |
