Network : Add ns, nu and nd.
This commit is contained in:
parent
b16ae6ea45
commit
aabe449f59
|
@ -7,3 +7,26 @@ function bluetooth() {
|
||||||
function network() {
|
function network() {
|
||||||
nm-connection-editor
|
nm-connection-editor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Show active connections.
|
||||||
|
function ns() {
|
||||||
|
nmcli connection show
|
||||||
|
}
|
||||||
|
|
||||||
|
# Start the connection.
|
||||||
|
# Usage: nu <CONNECTION>
|
||||||
|
function nu() {
|
||||||
|
nmcli connection up "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stop the connection.
|
||||||
|
# Usage: nd <CONNECTION>
|
||||||
|
function nd() {
|
||||||
|
nmcli connection down "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function _complete_connections() {
|
||||||
|
_autocomplete $(nmcli connection show | sed "1d" | cut -d\ -f1)
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F _complete_connections nd nu
|
||||||
|
|
Loading…
Reference in a new issue