diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index 32302c1..78e4871 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -1,11 +1,11 @@ bt() { (( ${+commands[bluetoothctl]} )) || return 2 - if [[ $1 == on ]]; then + if [[ $1 == "on" ]]; then (( ${+commands[connmanctl]} )) && connmanctl enable bluetooth && sleep 0.5 bluetoothctl power on - elif [[ $1 == off ]]; then + elif [[ $1 == "off" ]]; then bluetoothctl power off (( ${+commands[connmanctl]} )) && connmanctl disable bluetooth @@ -55,9 +55,9 @@ open() { wg() { (( ${+commands[wg]} )) && (( ${+commands[wg-quick]} )) || return 2 - if [[ $1 == up ]]; then + if [[ $1 == "up" ]]; then sudo wg-quick up $2 - elif [[ $1 == down ]]; then + elif [[ $1 == "down" ]]; then sudo wg-quick down $2 else command wg "$@"