rofi: Format rofi-surfraw with shellcheck

This commit is contained in:
Marty Oehme 2020-09-12 17:41:12 +02:00
parent 34fca7670f
commit 377ab6ea56
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# source surfraw config # source surfraw config
source $HOME/.surfraw.conf source $HOME/.surfraw.conf
@ -42,7 +42,8 @@ Searches without prepended engine use "${default}"</span>"
elvi=$(echo -e "${list}\n${custom}" | rofi -dmenu -mesg "${HELP_MSG}" -p "Search > ") elvi=$(echo -e "${list}\n${custom}" | rofi -dmenu -mesg "${HELP_MSG}" -p "Search > ")
# Some logic # Some logic
if [[ $elvi == "" ]]; then exit if [[ $elvi == "" ]]; then
exit
elif [[ $elvi == "!"* ]]; then elif [[ $elvi == "!"* ]]; then
entry=$(grep "$(echo "${elvi}" | awk '{ print $1 }')" "$HOME/.config/rofi-surfraw/searchengines") entry=$(grep "$(echo "${elvi}" | awk '{ print $1 }')" "$HOME/.config/rofi-surfraw/searchengines")
method=$(echo "${entry}" | awk -F ' - ' '{ print $2 }') method=$(echo "${entry}" | awk -F ' - ' '{ print $2 }')