Hi,

2010-10-23 07:11, Jonathan Nieder skrev:
> 
>> *) Quoting, see above.
> 
> There are two precedents to compare.  BROWSER does some wacko thing
> (actually, I never understood it and I fear different programs
> have different behavior with shell metacharacters). 

It substitutes %s if there's a %s in the string. Take a look at
/usr/bin/sensible-browser.

> iirc EDITOR and
> VISUAL traditionally are passed to the shell somewhat like this:
> 
>  sh -c "$EDITOR \"\$1\"" - filename
> 
> or within a shell:
> 
>  set -- filename
>  eval "$EDITOR" '"$1"'

Again, why not simply

$EDITOR "$1"

> I wouldn't mind just forbidding shell metacharacters[*] if you prefer
> that.
> 
> [*] 
> http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02

Yeah, putting metacharacters in a variable is asking for trouble anyway.

-- 
Pelle



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to