On Thu, 28 Apr 2016 18:01:46 -0400
Greg Reagle <greg.rea...@umbc.edu> wrote:

> I use dwm.  Sometimes I use Mod-p to start a GUI program
> like firefox. I looked at the output of ps xf and noticed
> that my shell is sticking around:
> 21347 ?        S      0:00 /usr/bin/fish
> 21388 ?        Rl     0:04  \_ iceweasel
> 
> I can type `exec firefox` instead of `firefox` to avoid
> this, but should I have to?  Am I doing something wrong
> or is dwm supposed to work this way?
> 
> Thank you.
> 

dmenu lets you any shell expression, it means that you
cannot always just add exec to the beginning. For example,

  for i in $(seq 10); do blah blah blah; done

cannot be rewritten as

  exec for i in $(seq 10); do blah blah blah; done

This is _not_ limited to when the first word is a
reserved word. Figuring out when you can add exec
is not possible outside the shell itself. Therefore
I think the best solution would be if shell's had
-o exec-when-possible, that dmenu could start the
shell with. This there something like this? This
would be useful for system(3) too.

Attachment: pgp0gd8buyk4N.pgp
Description: OpenPGP digital signature

Reply via email to