From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JADRA-0003Ba-KK for mharc-grub-devel@gnu.org; Wed, 02 Jan 2008 18:55:52 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JADR9-0003Ab-Cl for grub-devel@gnu.org; Wed, 02 Jan 2008 18:55:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JADR9-0003AO-2s for grub-devel@gnu.org; Wed, 02 Jan 2008 18:55:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JADR8-0003AK-Qp for grub-devel@gnu.org; Wed, 02 Jan 2008 18:55:50 -0500 Received: from ns39764.ovh.net ([91.121.25.85] helo=nexedi.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JADR8-0001KZ-IF for grub-devel@gnu.org; Wed, 02 Jan 2008 18:55:50 -0500 Received: from [10.8.0.46] (unknown [10.8.0.46]) by nexedi.com (Postfix) with ESMTP id C62483EB24 for ; Thu, 3 Jan 2008 01:00:30 +0100 (CET) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Thu, 3 Jan 2008 00:55:48 +0100 User-Agent: KMail/1.9.4 References: <20080101124728.GA30417@thorin> <20080101173806.GA3440@thorin> <20080102214831.GA6322@thorin> In-Reply-To: <20080102214831.GA6322@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801030055.48575.okuji@enbug.org> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: Re: [PATCH] allow user-configurable menucolor X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2008 23:55:51 -0000 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. Okuji