File tree Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Expand file tree Collapse file tree 5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,7 @@ cross_platform = 2to3 \
300300 newlist \
301301 newusers \
302302 ngrep \
303+ nload \
303304 nmap \
304305 _nmcli \
305306 _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 = \
418418 test_newusers.py \
419419 test_ngrep.py \
420420 test_nl.py \
421+ test_nload.py \
421422 test_nm.py \
422423 test_nmap.py \
423424 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
243243newusers
244244ngrep
245245nl
246+ nload
246247nm
247248nmap
248249nproc
You can’t perform that action at this time.
0 commit comments