All of lore.kernel.org
 help / color / mirror / Atom feed
From: adrian15 <adrian15@raulete.net>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Variables help inside a command help
Date: Tue, 12 Jun 2007 13:57:33 +0200	[thread overview]
Message-ID: <466E8A2D.1020005@raulete.net> (raw)

	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




                 reply	other threads:[~2007-06-12 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=466E8A2D.1020005@raulete.net \
    --to=adrian15@raulete.net \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.