grub-devel
[Top][All Lists]
Advanced

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

Variables help inside a command help


From: adrian15
Subject: Variables help inside a command help
Date: Tue, 12 Jun 2007 13:57:33 +0200
User-agent: Thunderbird 1.5.0.8 (X11/20061107)

        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 via email to

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