Skip to content

Commit

Permalink
[extglob] Make note of use cases for negation.
Browse files Browse the repository at this point in the history
Addresses issue #192.
  • Loading branch information
Andy Chu committed Oct 7, 2018
1 parent c70e5c3 commit 7eba47d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/complete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ grep-extglob() {
grep -E --color '[@?!+*]\(' "$@"
}

# A very common case is something like:
#
# --host|-!(-*)h
#
# which matches --host, -h, -ah, but NOT --h.
#
# https://github.com/oilshell/oil/issues/192
grep-extglob-negation() {
grep -E --color '!\(' $BASH_COMP ../bash-completion/completions/*
}

audit() {
local file=${1:-$GIT_COMP}

Expand Down

0 comments on commit 7eba47d

Please sign in to comment.