#!/bin/sh
# elvis: deli		-- Search Delicious bookmarks
# Author: jason ryan • http://jasonwryan.com

. surfraw || exit 1

w3_usage_hook () {
    cat <<EOF
Usage: $w3_argv0 [options] [search-string]
Description: Search Delicious bookmarks (www.delicious.com)

EOF
    w3_global_usage
}

w3_config
w3_parse_args "$@"
# w3_args now contains list of arguments

# standard topic seach
if [ -z "$w3_args" ]; then
	w3_browse_url "http://www.delicious.com/discover"
else
	escaped_args=$(w3_url_of_arg $w3_args)
	w3_browse_url "http://www.delicious.com/search?p=${escaped_args}"
fi
