Commit bacd62cf authored by Kyle's avatar Kyle

Merge branch 'use-posix-output-substitution' into 'master'

Make style of output capture uniform

See merge request surfraw/Surfraw!4
parents 2ef29f78 7b9162e8
......@@ -111,7 +111,7 @@ Or... How to Eat The CHEESE
string argument into something that can be seen in a URL without
embarrassment.
i.e escaped_args=`w3_url_of_arg $w3_args`
i.e escaped_args=$(w3_url_of_arg $w3_args)
In our last exhilarating moments we then build the final URL and
pass it onto the currently selected browser with w3_browse_url,
......
......@@ -132,7 +132,7 @@ if test -z "$w3_args"; then
else SURFRAW_acronym_path="http://www.acronymfinder.com/random.aspx" # Random Acronym
fi
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ "$SURFRAW_acronym_attic" = 1 ]; then
SURFRAW_acronym_path="http://www.acronymattic.com/~/search/aa.aspx?Acronym=" # Acronym Attic
else
......
......@@ -18,7 +18,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://adsabs.harvard.edu/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
# not direct to ads, construct url from options
url="http://adsabs.harvard.edu/cgi-bin/nph-basic_connect?qsearch=${escaped_args}&version=1"
......
......@@ -43,6 +43,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://alioth.debian.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://alioth.debian.org/search/?words=${escaped_args}&type_of_search=$SURFRAW_alioth_searchtype"
fi
......@@ -202,7 +202,7 @@ esac
if null "$w3_args"; then
w3_browse_url "https://${host}/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ "$SURFRAW_amazon_search" = books ] ; then
SURFRAW_amazon_search=stripbooks
elif [ "$SURFRAW_amazon_search" = all ] ; then
......
......@@ -63,26 +63,26 @@ cnt=0
if [ ! -z "$w3_args" ]; then
case $SURFRAW_arxiv_scope in
all | title | abstract)
if [ `w3_url_of_arg $w3_args | cut -c1` = \" ]; then
terms="+EXACT+"`echo $w3_args | sed -e 's/ /_/g'`
if [ $(w3_url_of_arg $w3_args | cut -c1) = \" ]; then
terms="+EXACT+"$(echo $w3_args | sed -e 's/ /_/g')
else
for w in $w3_args ; do
terms="+"`w3_url_of_arg $w`$terms
terms="+"$(w3_url_of_arg $w)$terms
cnt=$((cnt + 1))
if [ $cnt -gt 1 ]; then
terms="+AND"$terms
fi
done
fi
terms=`echo $terms | sed -e 's/"//g'`
terms=$(echo $terms | sed -e 's/"//g')
;;
author)
# Names without commas need to be reversed
echo "$w3_args" | grep -q ","
if [ $? -eq 0 ]; then
# Name already in last, first format.
terms=`echo "$w3_args" | sed -e "s/,/_/g" -e "s/ //g"`
terms="+"`w3_url_of_arg $terms`
terms=$(echo "$w3_args" | sed -e "s/,/_/g" -e "s/ //g")
terms="+"$(w3_url_of_arg $terms)
else
# Name in first last format. Need to reverse.
first=""
......@@ -99,11 +99,11 @@ if [ ! -z "$w3_args" ]; then
terms="${last}_"
fi
terms="$terms$first"
terms="+"`w3_url_of_arg $terms`
terms="+"$(w3_url_of_arg $terms)
fi
;;
fulltext)
terms=`w3_url_escape $w3_args`
terms=$(w3_url_escape $w3_args)
;;
*)
return 1 ;;
......
......@@ -20,6 +20,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.ask.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.ask.com/web?q=${escaped_args}"
fi
......@@ -137,7 +137,7 @@ esac
if test -z "$w3_args" && test "$SURFRAW_aur_action" = "Search=Go"; then
w3_browse_url "${SURFRAW_aur_protocol}://aur.archlinux.org/packages.php?setlang=${aur_lang}"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ "$SURFRAW_aur_outdated" = 1 ]; then
w3_browse_url "${SURFRAW_aur_protocol}://aur.archlinux.org/packages.php?O=0&L=0&detail=1&C=${aur_category}&K=${escaped_args}&SeB=${aur_search_by}&SB=${aur_sort_by}&SO=${SURFRAW_aur_order}&PP=${SURFRAW_aur_results}&do_${SURFRAW_aur_action}&outdated=on&setlang=${aur_lang}"
else
......
......@@ -49,6 +49,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.austlii.edu.au/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.austlii.edu.au/cgi-bin/sinosrch.cgi?method=${SURFRAW_austlii_method}&meta=%2Fau&query=${escaped_args}&results=${SURFRAW_austlii_results}&submit=Search&callback=on&mask_world=&mask_path="
fi
......@@ -43,7 +43,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://news.bbc.co.uk/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ $SURFRAW_bbcnews_scope = uk ]; then
w3_browse_url "http://search.bbc.co.uk/search?scope=uk&tab=ns&q=${escaped_args}"
else
......
......@@ -23,6 +23,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://www.bing.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://www.bing.com/search?q=${escaped_args}&go=&form=QBLH&filt=all"
fi
......@@ -78,7 +78,7 @@ w3_parse_option_hook () {
optarg="$2"
case "$opt" in
-author=*)
setopt SURFRAW_bookfinder_author `w3_url_of_arg "$optarg"` ;;
setopt SURFRAW_bookfinder_author $(w3_url_of_arg "$optarg") ;;
-binding=any) setopt SURFRAW_bookfinder_binding '*' ;;
-binding=*) setopt SURFRAW_bookfinder_binding "$optarg" ;;
-classic) setoptyn SURFRAW_bookfinder_classic 1 ;;
......@@ -86,14 +86,14 @@ w3_parse_option_hook () {
-destination=*) setopt SURFRAW_bookfinder_destination "$optarg" ;;
-first) setoptyn SURFRAW_bookfinder_first 1 ;;
-keywords=*)
setopt SURFRAW_bookfinder_keywords `w3_url_of_arg "$optarg"` ;;
setopt SURFRAW_bookfinder_keywords $(w3_url_of_arg "$optarg") ;;
-language=*) setopt SURFRAW_bookfinder_language "$optarg" ;;
-maxprice=*) setopt SURFRAW_bookfinder_maxprice "$optarg" ;;
-minprice=*) setopt SURFRAW_bookfinder_minprice "$optarg" ;;
-search=*) setopt SURFRAW_bookfinder_search "$optarg" ;;
-signed) setoptyn SURFRAW_bookfinder_signed 1 ;;
-title=*)
setopt SURFRAW_bookfinder_title `w3_url_of_arg "$optarg"` ;;
setopt SURFRAW_bookfinder_title $(w3_url_of_arg "$optarg") ;;
-type=any) setopt SURFRAW_bookfinder_type '*' ;;
-type=*) setopt SURFRAW_bookfinder_type "$optarg" ;;
*) return 1 ;;
......@@ -108,7 +108,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
url="http://www.bookfinder.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
case "$SURFRAW_bookfinder_search" in
author) setopt SURFRAW_bookfinder_author "$escaped_args" ;;
isbn) setopt SURFRAW_bookfinder_isbn "$escaped_args" ;;
......
......@@ -19,7 +19,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.bugmenot.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.bugmenot.com/view/${escaped_args}"
fi
......@@ -79,7 +79,7 @@ esac
if test -z "$w3_args"; then
w3_browse_url "${SURFRAW_bugzilla_site}/query.cgi?format=advanced"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
# params="short_desc_type=allwordssubstr&short_desc=${escaped_args}&bug_status=${SURFRAW_bugzilla_status}"
params="content=${escaped_args}&bug_status=${SURFRAW_bugzilla_status}"
params="${params}&product=${SURFRAW_bugzilla_product}"
......
......@@ -22,6 +22,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://www.cia.gov/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://www.cia.gov/search?q=${escaped_args}&site=CIA&client=CIA&proxystylesheet=CIA&output=xml_no_dtd&myAction=%2Fsearch&submitMethod=get"
fi
......@@ -19,7 +19,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://tools.cisco.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
# w3_browse_url "https://tools.cisco.com/search/JSP/search-results.get?strQueryText=${escaped_args}&Search+All+cisco.com=cisco.com"
w3_browse_url "https://tools.cisco.com/search/results/en/us/get?q=${escaped_args}&js=0"
fi
......@@ -42,7 +42,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://citeseerx.ist.psu.edu/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
url="http://citeseerx.ist.psu.edu/search?q=${escaped_args}&submit=Search"
if ifyes SURFRAW_cite_citations; then
url="${url}&ic=1"
......
......@@ -22,6 +22,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.cliki.net/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.cliki.net/site/search?query=${escaped_args}"
fi
......@@ -20,6 +20,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://cnn.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.cnn.com/search/?query=${escaped_args}&x=0&y=0&primaryType=mixed"
fi
......@@ -18,6 +18,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.legislation.gov.au/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.legislation.gov.au/Search/${escaped_args}"
fi
......@@ -52,7 +52,7 @@ url=https://www.commandlinefu.com/commands/matching
# normalize to "x".
url=$url/x
# What is really used is the base64 encoded query. (echo -n is not portable)
url=$url/"`printf %s "$w3_args" | base64`"
url=$url/"$(printf %s "$w3_args" | base64)"
# possibly add the sorting option
if test $SURFRAW_commandlinefu_votes -eq 1; then
url="$url/sort-by-votes"
......
......@@ -42,7 +42,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://www.ctan.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if ifno SURFRAW_ctan_topics &&
ifno SURFRAW_ctan_desc &&
ifno SURFRAW_ctan_authors
......
......@@ -377,6 +377,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.xe.com/currencyconverter/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.xe.com/currencyconverter/Amount=${escaped_args}&From=${SURFRAW_currency_from}&To=${SURFRAW_currency_to}&submit=Perform+Currency+Conversion"
fi
......@@ -20,6 +20,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://cve.mitre.org"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://cve.mitre.org/cgi-bin/cvename.cgi?name=${escaped_args}"
fi
......@@ -129,7 +129,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://www.debian.org/Bugs"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
setoptyn donum 0
setoptyn domaint 0
......@@ -202,32 +202,32 @@ else
fi
if [ "$SURFRAW_debbugs_incstatus" != "" ]
then
add=`echo "$SURFRAW_debbugs_incstatus"|perl -ne 's/pending/pending-fixed/g;s/open/pending/g;print(join("&pend-inc=","",split(/\s*,\s*/,$_)));'`
add=$(echo "$SURFRAW_debbugs_incstatus"|perl -ne 's/pending/pending-fixed/g;s/open/pending/g;print(join("&pend-inc=","",split(/\s*,\s*/,$_)));')
url="${url}${add}"
fi
if [ "$SURFRAW_debbugs_excstatus" != "" ]
then
add=`echo "$SURFRAW_debbugs_excstatus"|perl -ne 'print(join("&pend-exc=","",split(/\s*,\s*/,$_)));'`
add=$(echo "$SURFRAW_debbugs_excstatus"|perl -ne 'print(join("&pend-exc=","",split(/\s*,\s*/,$_)));')
url="${url}${add}"
fi
if [ "$SURFRAW_debbugs_incsev" != "" ]
then
add=`echo "$SURFRAW_debbugs_incsev"|perl -ne 'print(join("&sev-inc=","",split(/\s*,\s*/,$_)));'`
add=$(echo "$SURFRAW_debbugs_incsev"|perl -ne 'print(join("&sev-inc=","",split(/\s*,\s*/,$_)));')
url="${url}${add}"
fi
if [ "$SURFRAW_debbugs_excsev" != "" ]
then
add=`echo "$SURFRAW_debbugs_excsev"|perl -ne 'print(join("&sev-exc=","",split(/\s*,\s*/,$_)));'`
add=$(echo "$SURFRAW_debbugs_excsev"|perl -ne 'print(join("&sev-exc=","",split(/\s*,\s*/,$_)));')
url="${url}${add}"
fi
if [ "$SURFRAW_debbugs_inctag" != "" ]
then
add=`echo "$SURFRAW_debbugs_inctag"|perl -ne 'print(join("&include=","",split(/\s*,\s*/,$_)));'`
add=$(echo "$SURFRAW_debbugs_inctag"|perl -ne 'print(join("&include=","",split(/\s*,\s*/,$_)));')
url="${url}${add}"
fi
if [ "$SURFRAW_debbugs_exctag" != "" ]
then
add=`echo "$SURFRAW_debbugs_exctag"|perl -ne 'print(join("&exclude=","",split(/\s*,\s*/,$_)));'`
add=$(echo "$SURFRAW_debbugs_exctag"|perl -ne 'print(join("&exclude=","",split(/\s*,\s*/,$_)));')
url="${url}${add}"
fi
fi
......
......@@ -18,6 +18,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://codesearch.debian.net"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://codesearch.debian.net/search?q=${escaped_args}"
fi
......@@ -123,7 +123,7 @@ fi
if test -z "$w3_args"; then
w3_browse_url "$searchpage"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if ifyes SURFRAW_debcontents_ubuntu
then
......
......@@ -71,12 +71,12 @@ then
else
searchtype="&firsthit=I%27m+feeling+lucky"
fi
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://lists.debian.org/msgid-search/?m=${escaped_args}${searchtype}"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
url="https://lists.debian.org/cgi-bin/search?P=${escaped_args}"
if ifyes SURFRAW_deblists_matchany
then
......
......@@ -19,6 +19,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://changelogs.debian.net/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://changelogs.debian.net/${escaped_args}"
fi
......@@ -123,7 +123,7 @@ fi
if test -z "$w3_args"; then
w3_browse_url "$searchpage"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ "${SURFRAW_debian_distro}" = "any" ]; then
SURFRAW_debian_distro="all"
fi
......
......@@ -36,7 +36,7 @@ do_control()
do_package()
{
if [ ! -x "`which apt-cache`" ]
if [ ! -x "$(which apt-cache)" ]
then
err "apt-cache not installed. Try finding the homepage via debpts instead"
return
......
......@@ -38,6 +38,6 @@ if [ $SURFRAW_debpts_viewdocs -eq 1 ]; then
elif test -z "$w3_args"; then
w3_browse_url "https://packages.qa.debian.org/common/index.html"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://packages.qa.debian.org/common/index.html?src=${escaped_args}"
fi
......@@ -18,6 +18,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://security-tracker.debian.org/tracker"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://security-tracker.debian.org/tracker/${escaped_args}"
fi
......@@ -36,7 +36,7 @@ do_control()
do_package()
{
if [ ! -x "`which apt-cache`" ]
if [ ! -x "$(which apt-cache)" ]
then
err "apt-cache not installed. Try finding the vcs via debpts instead"
return
......
......@@ -48,7 +48,7 @@ if test -z "$w3_args"
then
w3_browse_url "$url"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
url="${url}/FindPage?"
if ifyes SURFRAW_debwiki_direct
then
......
......@@ -39,7 +39,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://groups.google.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if test "${SURFRAW_deja_style}" = "normal"; then
w3_browse_url "https://groups.google.com/groups?q=${escaped_args}&num=${SURFRAW_deja_results}"
else
......
......@@ -46,7 +46,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://www.discogs.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://www.discogs.com/search?type=${SURFRAW_discogs_category}&q=${escaped_args}&btn=Search"
fi
......
......@@ -74,7 +74,7 @@ if [ "$SURFRAW_graphical" != "yes" ] ; then
SURFRAW_duckduckgo_params="${SURFRAW_duckduckgo_params}&kf=-1&kz=-1&kq=-1&kv=-1"
fi
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ "$SURFRAW_duckduckgo_got_a_ducky_feeling" = 1 ]; then
escaped_args="! ${escaped_args}"
fi
......
......@@ -103,7 +103,7 @@ else
TLD=com
fi
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
host="http://ebay.${TLD}"
pathstart="search/search.dll?MfcISAPICommand=GetResult&krd=1&ht=1&shortcut=4&SoftProperty=MetaEndSort&cgiurl=http%3A%2F%2Fcgi"
pathend="%2Fws%2F&maxRecordsPerPage=$SURFRAW_ebay_results&st=2&ebaytag1code=77&query=${escaped_args}"
......
......@@ -21,6 +21,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.etymonline.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.etymonline.com/?search=${escaped_args}"
fi
......@@ -18,6 +18,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.excite.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://msxml.excite.com/excite/ws/results/Web/${escaped_args}/1/417/TopNavigation/Relevance/iq=true/zoom=off/_iceUrlFlag=7?_IceUrl=true"
fi
......@@ -37,7 +37,7 @@ w3_parse_option_hook () {
w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
test -z "$w3_args" || escaped_args=`w3_url_of_arg $w3_args`
test -z "$w3_args" || escaped_args=$(w3_url_of_arg $w3_args)
if ok SURFRAW_f5_dc; then
if test -z "$escaped_args"; then
......
......@@ -22,6 +22,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://foldoc.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://foldoc.org/${escaped_args}"
fi
......@@ -129,7 +129,7 @@ w3_parse_option_hook () {
w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
test -z "$w3_args" || escaped_args=`w3_url_of_arg $w3_args`
test -z "$w3_args" || escaped_args=$(w3_url_of_arg $w3_args)
if ok SURFRAW_freebsd_portsearch; then
if test -z "$escaped_args"; then
......
......@@ -102,7 +102,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url http://www.freedb.org/
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
SURFRAW_freedb_queryopts="page=${SURFRAW_freedb_page}&"
if ifyes SURFRAW_freedb_id; then
......
......@@ -18,6 +18,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.freecode.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.freecode.com/search?q=${escaped_args}"
fi
......@@ -19,6 +19,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://directory.fsf.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://directory.fsf.org/search/?query=${escaped_args}"
fi
......@@ -40,7 +40,7 @@ fi
if test -z "$w3_args"; then
w3_browse_url "https://www.google.com/intl/$SURFRAW_lang/help/features_list.html#cached"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if [ "$SURFRAW_cache_graphic" = 1 ]; then
w3_browse_url "https://www.google.com/search?q=cache:${escaped_args}&hl=$SURFRAW_lang"
else
......
......@@ -18,7 +18,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://bugs.gentoo.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
terms=`echo $escaped_args | sed 's/%20/+/g'`
escaped_args=$(w3_url_of_arg $w3_args)
terms=$(echo $escaped_args | sed 's/%20/+/g')
w3_browse_url "https://bugs.gentoo.org/buglist.cgi?quicksearch=${terms}"
fi
......@@ -23,6 +23,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://gpo.zugaina.org"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://gpo.zugaina.org/Search?search=${escaped_args}"
fi
......@@ -57,7 +57,7 @@ then
url=http://search.gmane.org/
fi
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if ifyes SURFRAW_gmane_listsearch
then
url="http://dir.gmane.org/search.php?match=${escaped_args}"
......
......@@ -116,10 +116,10 @@ else
esac
url="${url}.google.${domain}/${search}"
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
url="${url}?q=${escaped_args}&num=${SURFRAW_google_results}"
if [ "$SURFRAW_google_lucky" = 1 ]; then
button=`w3_url_escape "I'm Feeling Lucky"`
button=$(w3_url_escape "I'm Feeling Lucky")
url="${url}&btnI=$button"
fi
url="${url}${safe}${extra}"
......
......@@ -40,7 +40,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://www.gutenberg.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
if ifno SURFRAW_gutenberg_author &&
ifno SURFRAW_gutenberg_title &&
ifno SURFRAW_gutenberg_num
......
......@@ -49,7 +49,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://www.imdb.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
#Avoids people having to quote "My+Movies" on command line
if [ $SURFRAW_imdb_category = MyMovies ]; then
SURFRAW_imdb_category="My+Movies"
......
......@@ -92,6 +92,6 @@ else
ko|kr|kp|hangul) SURFRAW_ixquick_lang="hangul" ;;
*) SURFRAW_ixquick_lang="english" ;;
esac
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "${proto}://www.ixquick.com/do/metasearch.pl?cat=${SURFRAW_ixquick_search}&cmd=process_search&language=${SURFRAW_ixquick_lang}&query=${escaped_args}"
fi
......@@ -62,7 +62,7 @@ else
es|spanish) setopt SURFRAW_jamendo_lang es ;;
*) setopt SURFRAW_jamendo_lang en ;;
esac
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://www.jamendo.com/${SURFRAW_jamendo_lang}/search?qs=q=${escaped_args}"
fi
......@@ -66,7 +66,7 @@ esac
if test -z "$w3_args"; then
w3_browse_url "http://download.oracle.com/${JAVA_SITE}"
else
button=`w3_url_escape "I'm Feeling Lucky"`
escaped_args=`w3_url_of_arg $w3_args`
button=$(w3_url_escape "I'm Feeling Lucky")
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://www.google.com/search?q=${escaped_args}&sitesearch=download.oracle.com/${JAVA_SITE}&btnI=${button}"
fi
......@@ -19,6 +19,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://api.jquery.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "https://api.jquery.com?s=${escaped_args}"
fi
......@@ -22,6 +22,6 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "http://l1sp.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
w3_browse_url "http://l1sp.org/search?q=${escaped_args}"
fi
......@@ -35,7 +35,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://last.fm/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
url="https://last.fm/search?q=${escaped_args}"
if ifno SURFRAW_lastfm_redirect
then
......
......@@ -69,12 +69,12 @@ w3_parse_args "$@"
if test -z "$w3_args"; then
w3_browse_url "https://dict.leo.org/"
else
escaped_args=`w3_url_of_arg $w3_args`
escaped_args=$(w3_url_of_arg $w3_args)
url="https://dict.leo.org/?search=${escaped_args}"
case "$SURFRAW_leodict_lang" in
en|de) ;;
*) SURFRAW_leodict_lang=`perl -e 'if((exists($ENV{LANG})) && ($ENV{LANG}=~/de/i)) { print "de\n"; } else { print "en\n"; }'` ;;
*) SURFRAW_leodict_lang=$(perl -e 'if((exists($ENV{LANG})) && ($ENV{LANG}=~/de/i)) { print "de\n"; } else { print "en\n"; }') ;;
esac
if yesno SURFRAW_leodict_link ; then url="$url&relink=on"
......
......@@ -37,7 +37,7 @@ w3_parse_args "$@"
if test -z "$w3_args"; then