File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ # lspci(8) completion -*- shell-script -*-
2+
3+ _lspci ()
4+ {
5+ local cur prev words cword
6+ _init_completion || return
7+
8+ case $prev in
9+ -s|-D|-O)
10+ return
11+ ;;
12+ -i)
13+ _filedir ids
14+ return
15+ ;;
16+ -p)
17+ _filedir pcimap
18+ return
19+ ;;
20+ -A)
21+ COMPREPLY+=( $( compgen -W ' $( $1 -A help | command grep -vF : )' \
22+ -- " $cur " ) )
23+ return
24+ ;;
25+ -H)
26+ COMPREPLY+=( $( compgen -W " 1 2" -- " $cur " ) )
27+ return
28+ ;;
29+ -F)
30+ _filedir
31+ return
32+ ;;
33+ esac
34+
35+ if [[ $cur == -* ]]; then
36+ COMPREPLY=( $( compgen -W ' $( _parse_help "$1" )' -- " $cur " ) )
37+ fi
38+ } &&
39+ complete -F _lspci lspci
40+
41+ # ex: filetype=sh
Original file line number Diff line number Diff line change 1+ assert_source_completions lspci
Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ RUN dpkg --add-architecture i386 && \
148148 optipng \
149149 p7zip-full \
150150 patchutils \
151+ pciutils \
151152 perl-doc \
152153 pinfo \
153154 pm-utils \
Original file line number Diff line number Diff line change 1+ proc setup {} {
2+ save_env
3+ }
4+
5+
6+ proc teardown {} {
7+ assert_env_unmodified
8+ }
9+
10+
11+ setup
12+
13+
14+ assert_complete_any "lspci -"
15+ sync_after_int
16+
17+ assert_complete_any "lspci -A "
18+ sync_after_int
19+
20+
21+ teardown
You can’t perform that action at this time.
0 commit comments