From ef4c7ed4025524c60a686b1cda55e2f5fdf559cc Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Sat, 16 May 2015 08:53:36 -0700 Subject: [PATCH] Added wifi connect shortcut to bashrc --- .bashrc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index eae7f94..b85487c 100644 --- a/.bashrc +++ b/.bashrc @@ -1,7 +1,7 @@ # Navigation if [[ ! "$OSTYPE" == darwin* ]]; -then +then alias ls="ls --color=auto" fi alias c="clear" @@ -71,6 +71,19 @@ function fb() { fi } +# wificonnect +# usage: wificonnect +# Connects the computer to the provided network +# Assumes the network interface is wlan0 +function wificonnect() { + if [ $# -ne 2]; then + echo "wificonnect" + echo "usage: wificonnect " + else + nmcli d wifi connect $1 password $2 iface wlan0 + fi +} + # Prompt Related Helpers # Add color shortcuts