File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ bashcomp_DATA = 2to3 \
160
160
ifup \
161
161
info \
162
162
inject \
163
+ inotifywait \
163
164
insmod \
164
165
installpkg \
165
166
interdiff \
Original file line number Diff line number Diff line change
1
+ # bash completion for inotifywait(1) -*- shell-script -*-
2
+
3
+ _inotifywait ()
4
+ {
5
+ local cur prev words cword
6
+ _init_completion || return
7
+
8
+ case $prev in
9
+ --help|--exclude|--excludei|--format|--timefmt|--timeout|-! (-* )[ht])
10
+ return
11
+ ;;
12
+ --fromfile|--outfile|-! (-* )o)
13
+ _filedir
14
+ return
15
+ ;;
16
+ --event|-! (-* )e)
17
+ COMPREPLY=( $( compgen -W " $( $1 --help 2> /dev/null | \
18
+ sed -e ' /^Events:/,/^[^ \t]/!d' \
19
+ -ne ' s/^[ \t]\{1,\}\([^ \t]\{1,\}\)[ \t].*/\1/p' ) " \
20
+ -- " $cur " ) )
21
+ return
22
+ ;;
23
+ esac
24
+
25
+ if [[ " $cur " == -* ]]; then
26
+ COMPREPLY=( $( compgen -W ' $( _parse_help "$1" )' -- " $cur " ) )
27
+ return
28
+ fi
29
+
30
+ _filedir
31
+ } &&
32
+ complete -F _inotifywait inotifywait
33
+
34
+ # ex: filetype=sh
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ EXTRA_DIST = \
232
232
test_import.py \
233
233
test_info.py \
234
234
test_inject.py \
235
+ test_inotifywait.py \
235
236
test_insmod.py \
236
237
test_installpkg.py \
237
238
test_interdiff.py \
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+
4
+ class TestInotifywait :
5
+
6
+ @pytest .mark .complete ("inotifywait " )
7
+ def test_1 (self , completion ):
8
+ assert completion .list
9
+
10
+ @pytest .mark .complete ("inotifywait --" )
11
+ def test_2 (self , completion ):
12
+ assert completion .list
13
+
14
+ @pytest .mark .complete ("inotifywait -e " )
15
+ def test_3 (self , completion ):
16
+ assert completion .list
You can’t perform that action at this time.
0 commit comments