From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Hy66s-0001Cm-Kr for mharc-grub-devel@gnu.org; Tue, 12 Jun 2007 09:08:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hy66r-0001Ca-Ly for grub-devel@gnu.org; Tue, 12 Jun 2007 09:08:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hy66q-0001Br-TN for grub-devel@gnu.org; Tue, 12 Jun 2007 09:08:33 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hy66q-0001Bf-9n for grub-devel@gnu.org; Tue, 12 Jun 2007 09:08:32 -0400 Received: from relay.udl.es ([193.144.10.29] helo=relay3.udl.es) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hy66p-0006rx-H3 for grub-devel@gnu.org; Tue, 12 Jun 2007 09:08:32 -0400 Received: from jupiter.udl.net (jupiter.udl.net [172.16.2.2]) by relay3.udl.es (8.13.7/8.13.7) with ESMTP id l5CD89mE012957 for ; Tue, 12 Jun 2007 15:08:16 +0200 Received: from [172.16.51.20] (PL-CAP020.udl.net [172.16.51.20]) by jupiter.udl.net (8.11.7p1+Sun/8.11.6) with ESMTP id l5CCxXq21525 for ; Tue, 12 Jun 2007 14:59:33 +0200 (MET DST) Message-ID: <466E8A2D.1020005@raulete.net> Date: Tue, 12 Jun 2007 13:57:33 +0200 From: adrian15 User-Agent: Thunderbird 1.5.0.8 (X11/20061107) MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (relay3.udl.es [10.69.4.19]); Tue, 12 Jun 2007 15:08:16 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.7/3407/Tue Jun 12 14:01:54 2007 on relay3.udl.es X-Virus-Status: Clean X-detected-kernel: Linux 2.6 (newer, 2) Subject: Variables help inside a command help 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: Tue, 12 Jun 2007 13:08:34 -0000 If you check the man pages of some linux commands you will see that there is a place where it talks about ENVIRONMENT VARIABLES or something similar where it describes some variables than can modify the way a command works. As long as we can "register" the options help like this: {"label", 'l', 0, "search devices by a filesystem label", 0, 0}, {"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first device found", "VAR", ARG_TYPE_STRING}, why shouldn't we do a similar thing for variables? I think a command should be able to register a: variable name - to set or not a value for this variable - to put a description for the variable so that when querying a command help this variable help also shows. And when querying "help variable" we see all the commands help about this variable. Let's see an example. cat defines this variable pager help: "1: Stops at each screen. 0: Do not stop." randomcolourcat defines this variable pager help: "1: Stops at each screen. 0: Do not stop." find defines this variable pager help: "1: Stops at each screen. 0: Do not stop." So if you type "help cat" apart from you see right now you see also: "1: Stops at each screen. 0: Do not stop." And if you type "help variable pager" you should see: cat: "1: Stops at each screen. 0: Do not stop." randomcolourcat: "1: Stops at each screen. 0: Do not stop." find: "1: Stops at each screen. 0: Do not stop." It's a stupid example but that's I mean. adrian15