home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c2bec6
)
Add ability to read search string from stdin
author
Siraaj Khandkar
<siraaj@khandkar.net>
Tue, 11 Jan 2022 18:16:18 +0000
(13:16 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Tue, 11 Jan 2022 18:16:18 +0000
(13:16 -0500)
home/lib/login_functions.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/lib/login_functions.sh
b/home/lib/login_functions.sh
index
ae4e98e
..
3ea0e1d
100644
(file)
--- 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() {
This page took
0.036089 seconds
and
4
git commands to generate.