[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#117528: xdvi no longer understands quotes in options



On Mon, Oct 29, 2001 at 12:46:50PM +0100, Meik Hellmund wrote:
> Package: tetex-bin
> Version: 1.0.7+20001218-6
> 
> Hi,
> 
> It seems that the recent modification in the xdvi shell script to work with 
> compressed dvi-files breaks  constructs like
> 
> xdvi -editor 'gnuclient -q +%l %f'  file.xdvi
> 
> I know, the xdvi binary provided by tetex-bin does not (yet?) support this
> option, but my private more recent xdvi binary does. Anyway, what about
> 
> xdvi -browser 'my_browser_needs_some_options -a -b -c' file.dvi  ?

Here's the problem:

for i
do
    args="$args $lastarg"
    lastarg=$i
done
filename=$lastarg

[...]

xdvi.bin $NAMEOPT $args $filename || exit 1
exit 0


I suggest the following hack using IFS to work around it.  It will
fail if any argument has a newline character in it, but that shouldn't
be much of a loss ;-)  Otherwise, one could replace the newline with
something else and use printf or equivalent.

for i
do
    args="$args
$lastarg"
    lastarg=$i
done
filename=$lastarg

[...]

args="$NAMEOPT
$args
$filename"

OIFS=IFS
IFS='
'
xdvi.bin $args || exit 1
exit 0


   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

         Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
       Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
          NEW: Visit http://www.helpthehungry.org/ to do just that
               ALSO  http://www.thehungersite.com/  is back!



Reply to: