solve your (CLI) problem via the web

This commit is contained in:
Fabien Benetou
2011-07-13 23:33:19 +02:00
parent 95d9fe9d5f
commit 8bc2cf1b2e

13
shell_scripts/error_search Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
if [ $# -lt 1 ]
then
echo "usage: my_failing_cmd 2>&1 > /dev/null | error_search"
exit;
fi
echo $1 | sed "s/.*/'\0'/" | xargs firefox -new-tab -search
# possible to use xdg-open or sensible-browser *IIF* they supporte search
# consider using a shell error stack if that exist
# consider using specific search engine (e.g. code repository) according to the current directory
## e.g. pwd | grep project case ... esac