[xmonad] darcs patch: XMonad.Core: make spawn smarter

Gwern Branwen gwern0 at gmail.com
Sat Sep 27 11:15:10 EDT 2008

On 2008.09.26 21:38:54 -0400, "Brandon S. Allbery KF8NH" <allbery at ece.cmu.edu> scribbled 0.9K characters:
> On 2008 Sep 26, at 21:11, Devin Mullins wrote:
>> On Fri, Sep 26, 2008 at 06:04:54PM -0400, Gwern Branwen wrote:
>>> A user's shell when invoked as /bin/sh throws away a lot of their
>>> customizations and addons; I wrote this patch for a user on #xmonad
>>> who was perplexed why some of his scripts and other shell things were
>>> simply Not Working.
>> Hrm, that makes sense. If you're used to some particular bash-only
>> syntax, you might expect it to work inside spawn.
> Traditional Unix behavior is that something spawned programmatically
> should use /bin/sh to get a consistent environment, while something
> spawned via user interaction should use the user's $SHELL.  Quite
> possibly the core spawn should stay as is and the prompt one should use a
> new $SHELL-based spawn (note that this can be done as a wrapper around
> the existing spawn).
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com

Sticking to hardcore traditional Unix behavior would be fine if we were unpleasant Dwm developers.

We could be all 'ROFL n00b, don't u know if you don't want /bin/sh you should write your own keybinding which uses "spawnObscure"? Why would you think the default spawn would act smart and work with your existing setup?'

Or, we could be friendly & helpful & make a simple 1 or 2 line change and never have to discuss it again. I don't see any real upside to the 'consistent environment' of /bin/sh; if anything, going through $SHELL is what would provide a 'consistent environment', since what the user is actually using and running in is $SHELL.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080927/2c54bd4e/attachment.bin

More information about the xmonad mailing list