Add quotes

This commit is contained in:
Sam A. 2023-03-14 16:32:14 +01:00
parent 3b25addae0
commit 7ea80527af
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,11 +1,11 @@
bt() { bt() {
(( ${+commands[bluetoothctl]} )) || return 2 (( ${+commands[bluetoothctl]} )) || return 2
if [[ $1 == on ]]; then if [[ $1 == "on" ]]; then
(( ${+commands[connmanctl]} )) && (( ${+commands[connmanctl]} )) &&
connmanctl enable bluetooth && sleep 0.5 connmanctl enable bluetooth && sleep 0.5
bluetoothctl power on bluetoothctl power on
elif [[ $1 == off ]]; then elif [[ $1 == "off" ]]; then
bluetoothctl power off bluetoothctl power off
(( ${+commands[connmanctl]} )) && (( ${+commands[connmanctl]} )) &&
connmanctl disable bluetooth connmanctl disable bluetooth
@ -55,9 +55,9 @@ open() {
wg() { wg() {
(( ${+commands[wg]} )) && (( ${+commands[wg-quick]} )) || return 2 (( ${+commands[wg]} )) && (( ${+commands[wg-quick]} )) || return 2
if [[ $1 == up ]]; then if [[ $1 == "up" ]]; then
sudo wg-quick up $2 sudo wg-quick up $2
elif [[ $1 == down ]]; then elif [[ $1 == "down" ]]; then
sudo wg-quick down $2 sudo wg-quick down $2
else else
command wg "$@" command wg "$@"