You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
misc/shell_scripts/error_search

14 lines
429 B

#!/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