Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3301452 in mainline


Ignore:
Timestamp:
2018-12-11T11:39:31Z (3 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master
Children:
ac2caecb
Parents:
25cfc3d
Message:

adding proper extended help message

Location:
uspace/app/bdsh/cmds/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/alias/alias.c

    r25cfc3d r3301452  
    8787void help_cmd_alias(unsigned int level)
    8888{
    89         printf("`%s' sets an alias, displays an alias or lists all aliases\n", cmdname);
    90         return;
     89        if (level == HELP_SHORT) {
     90                printf("`%s' sets an alias, displays an alias or lists all aliases\n", cmdname);
     91        } else {
     92                help_cmd_alias(HELP_SHORT);
     93                printf("Usage: `%s' [newalias[='existingCMD --flags] ...]'\n\n"
     94                    "If no parameters are given it will display all existing aliases.\n"
     95                    "If a parameter without an assignment is given, the value of the given alias will be returned.\n"
     96                    "If a parameter with an assignment is given, the alias will be created or updated for the given value. "
     97                    "It is possible to create an alias to a different alias. A circularity will prevent an alias to be resolved.\n",
     98                    cmdname);
     99        }
    91100}
    92101
  • uspace/app/bdsh/cmds/modules/unalias/unalias.c

    r25cfc3d r3301452  
    5454void help_cmd_unalias(unsigned int level)
    5555{
    56         printf("`%s' removes an alias or all aliases with -a\n", cmdname);
    57         return;
     56        if (level == HELP_SHORT) {
     57                printf("`%s' removes an alias or all aliases with -a\n", cmdname);
     58        } else {
     59                help_cmd_unalias(HELP_SHORT);
     60                printf("Usage: `%s' [-a] name [name ...]'\n\n"
     61                    "If no parameters are given it will display this help message.\n"
     62                    "If the flag -a is given, all existing aliases will be removed.\n"
     63                    "If one or multiple parameters are given, then those aliases will be removed.\n",
     64                    cmdname);
     65        }
    5866}
    5967
Note: See TracChangeset for help on using the changeset viewer.