Skip to content

Commit

Permalink
inotifywait: Avoid some false positive event names
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jan 12, 2019
1 parent 186d47d commit 82a50b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions completions/inotifywait
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ _inotifywait()
return
;;
--event|-!(-*)e)
# Expecting line with "Events:", followed by ones starting with one
# tab. Word following the tab is event name, others are line
# wrapped explanations.
COMPREPLY=( $( compgen -W "$( $1 --help 2>/dev/null | \
sed -e '/^Events:/,/^[^ \t]/!d' \
-ne 's/^[ \t]\{1,\}\([^ \t]\{1,\}\)[ \t].*/\1/p' )" \
sed -e '/^Events:/,/^[^\t]/!d' \
-ne 's/^[ \t]\([^ \t]\{1,\}\)[ \t].*/\1/p' )" \
-- "$cur" ) )
return
;;
Expand Down

0 comments on commit 82a50b0

Please sign in to comment.