[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, master, updated. surfraw_2-2-5_1-70-g6497019
James Rowe
jnrowe at gmail.com
Sun Feb 14 19:37:12 UTC 2010
The following commit has been merged in the master branch:
commit 6497019be6962ea40effd89a3bc17f8e1072f9f3
Author: James Rowe <jnrowe at gmail.com>
Date: Sun Feb 14 19:29:39 2010 +0000
Support for using tmux as $SURFRAW_screen.
This also adds generic support for giving arguments to $SURFRAW_screen, using
$SURFRAW_screen_args. Thanks to Ivy Foster.
diff --git a/ChangeLog b/ChangeLog
index 6cf8545..0ff3f11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2010-02-14 James Rowe <jnrowe at gmail.com>
+ * Added $SURFRAW_screen_args for passing arguments to the defined screen
+ tool, thanks to Ivy Foster.
+ * Support for using tmux as $SURFRAW_screen, thanks once again to Ivy
+ Foster.
* New elvi: bugmenot, thanks to Ivy Foster.
2010-02-05 Ian Beckwith <ianb at erislabs.net>
diff --git a/surfraw.1.IN b/surfraw.1.IN
index aad332b..6521569 100644
--- a/surfraw.1.IN
+++ b/surfraw.1.IN
@@ -269,6 +269,14 @@ Default:
defyn SURFRAW_new_screen no
.TP
+.B SURFRAW_screen_args
+Arguments to pass to the SURFRAW_screen command
+
+Default:
+
+ def SURFRAW_screen_args ""
+
+.TP
.B SURFRAW_quiet
I can't enjoy it with you talking all the time.
diff --git a/surfraw.IN b/surfraw.IN
index 429d1a7..b27f710 100644
--- a/surfraw.IN
+++ b/surfraw.IN
@@ -413,20 +413,29 @@ w3_dump () {
}
w3_browse_url () {
- if ok SURFRAW_new_screen && test -n "$STY" && test $mode = text; then
- screen=yes
- else
- screen=no
- fi
+ if ok SURFRAW_new_screen && test `echo $TERM | cut -c 1-6` = "screen" &&
+ test $mode = text; then
+ screen=yes
+ else
+ screen=no
+ fi
if ok SURFRAW_dump; then
w3_dump "$@"
elif ok SURFRAW_print; then
- echo "$@"
+ echo "$@"
elif ok screen; then
- if test $SURFRAW_browser_args = "none"; then
- $SURFRAW_screen $SURFRAW_browser "$@"
+ if [ "$SURFRAW_screen" = "tmux" ]; then
+ if test "$SURFRAW_browser_args" = "none"; then
+ $SURFRAW_screen $SURFRAW_screen_args "$SURFRAW_browser \"$@\""
+ else
+ $SURFRAW_screen $SURFRAW_screen_args "$SURFRAW_browser $SURFRAW_browser_args \"$@\""
+ fi
else
- $SURFRAW_screen $SURFRAW_browser $SURFRAW_browser_args "$@"
+ if test $SURFRAW_browser_args = "none"; then
+ $SURFRAW_screen $SURFRAW_screen_args $SURFRAW_browser "$@"
+ else
+ $SURFRAW_screen $SURFRAW_screen_args $SURFRAW_browser $SURFRAW_browser_args "$@"
+ fi
fi
else
if ok SURFRAW_graphical_remote && test $mode = graphical; then
diff --git a/surfraw.conf.IN b/surfraw.conf.IN
index f0c8516..08845bc 100644
--- a/surfraw.conf.IN
+++ b/surfraw.conf.IN
@@ -57,6 +57,9 @@ def SURFRAW_screen screen
# for each text browser invocation?
defyn SURFRAW_new_screen no
+# arguments for the screen command
+def SURFRAW_screen_args ""
+
# I can't enjoy it with you talking all the time
defyn SURFRAW_quiet no
--
surfraw - a fast unix command line interface to WWW
More information about the Surfraw-commits
mailing list