[21054] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: mozilla wrapper arg handling...

daemon@ATHENA.MIT.EDU (John Hawkinson)
Mon Nov 11 12:12:14 2002

Date: Mon, 11 Nov 2002 12:12:12 -0500
From: John Hawkinson <jhawk@MIT.EDU>
To: "t. belton" <tbelton@MIT.EDU>
Cc: bug-infoagents@MIT.EDU
Message-ID: <20021111171212.GS6227@multics.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.GSO.4.33L.0211041338550.23371-100000@iphigenia.mit.edu>

t. belton <tbelton@MIT.EDU> wrote on Mon,  4 Nov 2002
at 14:00:48 -0500 in <Pine.GSO.4.33L.0211041338550.23371-100000@iphigenia.mit.edu>:


> This is a case where I broke the advanced usage

If you deliberately break usage, the onus is upon you to document it.
Even if you don't put it in manpage or an obscure README somewhere,
it sure would be nice to not have "mozilla --help" lie to you.

> in order to try to get the basic usage to do the expected
> thing. I'll see if I can find away to get the full range of -remote
> commands to work right.

I don't understand why this is hard. A patch follows below.
Assume that if anyone is using -remote, they know what they're doing,
or at least stand a chance.

By the way, you seem to have the mozilal wrapper checked out and
locked. That seems poor:

[coleco-sidewinder!jhawk] ~infoagents/arch/share/bin> rlog mozilla

RCS file: RCS/mozilla,v
Working file: mozilla
head: 1.2
branch:
locks: strict
        tbelton: 1.2



> Needless to say, this requires secret munging to detect a running Mozilla
> and translate that second command into 'mozilla -remote "openURL([url])"'
> which is what is actually needed.
> 
> That munging is what has broken several of the other -remote commands.

See the below patch. I also added in an RCS $Header$ tag, which
I think you really need in there, to reduce confusion and let people
know where the source actually is.

Incidently the comments are...hard to read, I think :(

--jhawk

--- mozilla	Mon Nov  4 13:53:10 2002
+++ /tmp/m	Mon Nov 11 12:11:15 2002
@@ -1,5 +1,7 @@
 #!/bin/sh
-
+#
+# $Header: $
+#
 # no core dumps
 
 ulimit -c 0
@@ -148,7 +150,8 @@
       shift 2
       ;;
     -remote)
-      shift
+      remote="$1 $2"
+      shift 2
       ;;
     *)
       moreargs="$moreargs \"$1\""
@@ -171,8 +174,7 @@
 # to just bring focus to the existing browser window without
 # doing anything else).
 
-remote=""
-if [ $lock_found = 1 ]
+if [ $lock_found = 1 -a -z "$remote" ]
 then
   case "$@" in
     -*)

home help back first fref pref prev next nref lref last post