-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,6 +300,7 @@ cross_platform = 2to3 \ | |
newlist \ | ||
newusers \ | ||
ngrep \ | ||
nload \ | ||
nmap \ | ||
_nmcli \ | ||
_nox \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# bash completion for nload(1) -*- shell-script -*- | ||
|
||
_comp_cmd_nload() | ||
{ | ||
local cur prev words cword comp_args | ||
_comp_initialize -- "$@" || return | ||
|
||
local noargopts='!(-*|*[aiotuU]*)' | ||
case $prev in | ||
--help | -${noargopts}[haiot]) | ||
return | ||
;; | ||
-${noargopts}[uU]) | ||
_comp_compgen -- -W 'h b k m g H B K M G' | ||
return | ||
;; | ||
esac | ||
|
||
if [[ $cur == -* ]]; then | ||
_comp_compgen_help | ||
return | ||
fi | ||
|
||
_comp_compgen_available_interfaces | ||
} && | ||
complete -F _comp_cmd_nload nload | ||
|
||
# ex: filetype=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import pytest | ||
|
||
|
||
class TestNload: | ||
@pytest.mark.complete("nload ") | ||
def test_basic(self, completion): | ||
assert completion | ||
|
||
@pytest.mark.complete("nload -", require_cmd=True) | ||
def test_options(self, completion): | ||
assert completion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,6 +243,7 @@ newlist | |
newusers | ||
ngrep | ||
nl | ||
nload | ||
nm | ||
nmap | ||
nproc | ||
|