From: Siraaj Khandkar Date: Tue, 11 Jan 2022 18:16:18 +0000 (-0500) Subject: Add ability to read search string from stdin X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=56b5d8cf0df6d56c19d7b510748429da19137335;p=khome.git Add ability to read search string from stdin --- diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index ae4e98e..3ea0e1d 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -2,7 +2,19 @@ ## ws: web search ws() { - firefox --search "$*" + local line search_string0 search_string + + search_string0="$*" + case "$search_string0" in + '') + while read -r line; do + search_string="${search_string} ${line}" + done;; + *) + search_string="$search_string0";; + esac + + firefox --search "$search_string" } d() {