grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] allow user-configurable menucolor


From: Robert Millan
Subject: Re: [PATCH] allow user-configurable menucolor
Date: Thu, 3 Jan 2008 01:56:55 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Thu, Jan 03, 2008 at 12:55:48AM +0100, Yoshinori K. Okuji wrote:
> On Wednesday 02 January 2008 22:48, Robert Millan wrote:
> > On Tue, Jan 01, 2008 at 06:38:06PM +0100, Robert Millan wrote:
> > > `color' command is necessary to propagate user setting from environment
> > > variables to the internal color of our current terminal.
> >
> > Vesa suggested (on IRC) to use write hooks (grub_env_write_hook_t) in
> > variables to avoid this.  I tend to agree.  What do others think?
> 
> Generally speaking, if you are planning to read settings by scripting, it is 
> better to use a variable. If you are planning to change the behavior by 
> options, it is better to use a command.
> 
> Or, semantically, if you want to make an action, a command is suitable. If 
> you 
> want to set a state, a variable is more appropriate.
> 
> Anyway, you can accomplish nearly the same thing with both, thanks to the 
> hooks, so the choice is mostly a matter of taste.
> 
> Personally, I think this should come up with variables. It is just like a 
> prompt in bash for me.

Ok, variables then.  It's also more consistent, since the `color' command I
implemented was reliing on variables anyway.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]