All of lore.kernel.org
 help / color / mirror / Atom feed
* Variables help inside a command help
@ 2007-06-12 11:57 adrian15
  0 siblings, 0 replies; only message in thread
From: adrian15 @ 2007-06-12 11:57 UTC (permalink / raw)
  To: The development of GRUB 2

	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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-06-12 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 11:57 Variables help inside a command help adrian15

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.