Network : Add ns, nu and nd.

This commit is contained in:
Dmitry Voronin 2024-03-30 09:52:18 +03:00
parent b16ae6ea45
commit aabe449f59

View file

@ -7,3 +7,26 @@ function bluetooth() {
function network() {
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