[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, master, updated. surfraw_2-2-5_1-242-g846275f

Kyle Isom coder at kyleisom.net
Tue Oct 16 21:19:07 UTC 2012


The following commit has been merged in the master branch:
commit a92f93f06345406c68a2cafc20e9f14281b42633
Author: Kyle Isom <coder at kyleisom.net>
Date:   Tue Oct 16 14:57:23 2012 -0600

    Fix safe search in duck duck go.

diff --git a/elvi/duckduckgo b/elvi/duckduckgo
index 8487694..0f5feaf 100755
--- a/elvi/duckduckgo
+++ b/elvi/duckduckgo
@@ -25,7 +25,7 @@ Description:
 Local options:
     -d,-ducky,-l,-lucky         use in case of overwhelming feeling of duckiness
     -j,-javascript              use javascript
-    -p,-safe                    enable safe search
+    -safe                       enable safe search
     -r,-redirect                use redirection
     -s,-insecure                disable SSL search
 EOF
@@ -36,9 +36,9 @@ w3_parse_option_hook () {
     opt="$1"
     optarg="$2"
     case "$opt" in
-    -d*|-l*)            setoptyn    SURFRAW_duckduckgo_got_a_ducky_feeling 1 ;;
+    -d*|-l|-lu*)            setoptyn    SURFRAW_duckduckgo_got_a_ducky_feeling 1 ;;
     -j|-javascript*)    setoptyn    SURFRAW_duckduckgo_use_javascript      1 ;;
-    -p|-safe*)		setoptyn    SURFRAW_duckduckgo_safe_arg            1 ;;
+    -safe*)				setoptyn    SURFRAW_duckduckgo_safe_arg            1 ;;
     -r|-redirect*)      setoptyn    SURFRAW_duckduckgo_redirect_arg        1 ;;
     -s|-sec*)           setoptyn    SURFRAW_duckduckgo_https_arg           1 ;;
     *) return 1 ;;
@@ -76,7 +76,7 @@ fi
 
 escaped_args=`w3_url_of_arg $w3_args`
 if [ "$SURFRAW_duckduckgo_got_a_ducky_feeling" = 1 ]; then
-    escaped_args="! ${escaped args}"
+    escaped_args="! ${escaped_args}"
 fi
 
 w3_browse_url "${SURFRAW_duckduckgo_base_url}/?q=${escaped_args}${SURFRAW_duckduckgo_params}"

-- 
surfraw -  a fast unix command line interface to WWW



More information about the Surfraw-commits mailing list