Re: [dwm] dmenu_run problem

From: Daniel Bainton <dpb_AT_driftaway.org>
Date: Tue, 12 Feb 2008 10:31:37 +0200

On 11/02/2008, Sander van Dijk <a.h.vandijk_AT_gmail.com> wrote:
> On Feb 11, 2008 4:58 PM, Anselm R. Garbe <arg_AT_suckless.org> wrote:
> > On Mon, Feb 11, 2008 at 12:08:20PM +0100, Szabolcs Nagy wrote:
> > > - exe=`dmenu_path | dmenu $*` && exec $exe
> > > + set exe=`dmenu_path | dmenu $*` && exec $exe
> >
> > I'm not sure about this proposal either, but I applied your
> > change this morning.
>
> That shouldn't be necessary in the place you put it (in fact, it
> shouldn't have any noticeable effect at all there), since that script
> starts with #!/bin/sh, which should imply it will run in a Bourne
> compatible shell, which means the "var=value command" syntax should be
> understood.
>
> This "my shell doesn't understand 'var=value command'" only was a
> problem when that line was hardcoded in config.h, which would cause
> the entire command to be passed to the user's default shell, rather
> than to the current /bin/sh. In fact, that problem is the sole reason
> the dmenu_run script was created in the first place.
>
> Anyway, the 'set' won't hurt, so it's no big deal, but I'm quite sure
> it won't fix anything here either.

Sure, dmenu_path is run with /bin/sh, but the whole "exe=`dmenu_path |
dmenu $*` && exec $exe" isn't. If you'd look at the source code of
dwm, you'd see it takes the shell from the SHELL environmental
variable and runs the line with that.

--
Daniel
Received on Tue Feb 12 2008 - 09:31:40 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:19:04 UTC