File tree 5 files changed +42
-0
lines changed
5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,7 @@ cross_platform = 2to3 \
300
300
newlist \
301
301
newusers \
302
302
ngrep \
303
+ nload \
303
304
nmap \
304
305
_nmcli \
305
306
_nox \
Original file line number Diff line number Diff line change
1
+ # bash completion for nload(1) -*- shell-script -*-
2
+
3
+ _comp_cmd_nload ()
4
+ {
5
+ local cur prev words cword comp_args
6
+ _comp_initialize -- " $@ " || return
7
+
8
+ local noargopts=' !(-*|*[aiotuU]*)'
9
+ case $prev in
10
+ --help | -${noargopts} [haiot])
11
+ return
12
+ ;;
13
+ -${noargopts} [uU])
14
+ _comp_compgen -- -W ' h b k m g H B K M G'
15
+ return
16
+ ;;
17
+ esac
18
+
19
+ if [[ $cur == -* ]]; then
20
+ _comp_compgen_help
21
+ return
22
+ fi
23
+
24
+ _comp_compgen_available_interfaces
25
+ } &&
26
+ complete -F _comp_cmd_nload nload
27
+
28
+ # ex: filetype=sh
Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ EXTRA_DIST = \
418
418
test_newusers.py \
419
419
test_ngrep.py \
420
420
test_nl.py \
421
+ test_nload.py \
421
422
test_nm.py \
422
423
test_nmap.py \
423
424
test_nmcli.py \
Original file line number Diff line number Diff line change
1
+ import pytest
2
+
3
+
4
+ class TestNload :
5
+ @pytest .mark .complete ("nload " )
6
+ def test_basic (self , completion ):
7
+ assert completion
8
+
9
+ @pytest .mark .complete ("nload -" , require_cmd = True )
10
+ def test_options (self , completion ):
11
+ assert completion
Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ newlist
243
243
newusers
244
244
ngrep
245
245
nl
246
+ nload
246
247
nm
247
248
nmap
248
249
nproc
You can’t perform that action at this time.
0 commit comments