[xmonad] darcs patch: pass-through-unrecognised-flags

Daniel Wagner daniel at wagner-home.com
Mon Aug 19 14:59:49 CEST 2013


Dunno about advantage/disadvantage, but certainly a difference: 
environment variables will get inherited by children and command-line 
arguments will not.
~d

On 2013-08-18 21:58, adam vogt wrote:
> Hi David,
> 
> Is there an advantage to passing information this way over using
> environment variables? Currently this seems to work
> (System.Environment.getEnvironment):
> 
> $ ENABLE_FOO=1 xmonad
> 
> while your patch would allow contrib code to call
> System.Environment.getArgs to get something out of a very similar
> command line:
> 
> $ xmonad --enable-foo=1
> 
> --
> Adam
> 
> On Sat, Aug 17, 2013 at 10:32 PM,  <gopsychonauts at gmail.com> wrote:
>> 1 patch for repository http://code.haskell.org/xmonad:
>> 
>> Sun Aug 18 12:31:19 EST 2013  gopsychonauts at gmail.com
>>   * pass-through-unrecognised-flags
>> 
>>   Changes XMonad's core binary so that it won't reject arbitrary flags 
>> passed to
>>   the xmonad command, but instead simply passes them on to the user's 
>> XMonad
>>   binary. This allows for -contrib extensions to add their own 
>> command-line flags
>>   if desired.
>> 
>>   This does imply slightly less error-checking, but the flexibility 
>> afforded is,
>>   I think, worth it.
>> 
>> 
>> 
>> 
>> [pass-through-unrecognised-flags
>> gopsychonauts at gmail.com**20130818023119
>>  Ignore-this: 7f892156a5abb05247014337b70be013
>> 
>>  Changes XMonad's core binary so that it won't reject arbitrary flags 
>> passed to
>>  the xmonad command, but instead simply passes them on to the user's 
>> XMonad
>>  binary. This allows for -contrib extensions to add their own 
>> command-line flags
>>  if desired.
>> 
>>  This does imply slightly less error-checking, but the flexibility 
>> afforded is,
>>  I think, worth it.
>> 
>> ] hunk ./Main.hs 53
>>  #ifdef TESTING
>>          ("--run-tests":_)     -> Properties.main
>>  #endif
>> -        _                     -> fail "unrecognized flags"
>> +        _                     -> launch
>>   where
>>      shortVersion = ["xmonad", showVersion version]
>>      longVersion  = [ "compiled by", compilerName, showVersion 
>> compilerVersion
>> 
>> 
>> _______________________________________________
>> xmonad mailing list
>> xmonad at haskell.org
>> http://www.haskell.org/mailman/listinfo/xmonad
>> 
> 
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://www.haskell.org/mailman/listinfo/xmonad




More information about the xmonad mailing list