Browse Source

Tidy up some more output. The command-line code needs some severe

overhauling, but this is not the time to do it.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
c6060a8fea
2 changed files with 7 additions and 7 deletions
  1. 5
    5
      src/commandline/commands/help.c
  2. 2
    2
      src/commandline/commands/nvo_cmd.c

+ 5
- 5
src/commandline/commands/help.c View File

13
 	struct command *ccmd;
13
 	struct command *ccmd;
14
 	int unknown = 1;
14
 	int unknown = 1;
15
 	if(argc == 1){
15
 	if(argc == 1){
16
-		printf("Built in commands:\n\n\texit, quit\t\tExit the command line and boot\n\nCompiled in commands:\n\n");
16
+		printf("Available commands:\n\n  exit - Exit the command line and boot\n");
17
 
17
 
18
 		for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
18
 		for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
19
-			printf ("\t%s\t\t%s\n", ccmd->name, ccmd->desc );
19
+			printf ("  %s - %s\n", ccmd->name, ccmd->desc );
20
 		}
20
 		}
21
 	}else{
21
 	}else{
22
 		if(!strcmp(argv[1], "exit") || !strcmp(argv[1], "quit")){
22
 		if(!strcmp(argv[1], "exit") || !strcmp(argv[1], "quit")){
23
-			printf("exit, quit - The quit command\n\nUsage:\nquit or exit\n\n\tExample:\n\t\texit\n");
23
+			printf("exit - Exit the command line and boot\n\nUsage:\n  exit\n");
24
 		}else{
24
 		}else{
25
 			for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
25
 			for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
26
 				if(!strcmp(ccmd->name, argv[1])){
26
 				if(!strcmp(ccmd->name, argv[1])){
27
 					unknown = 0;
27
 					unknown = 0;
28
-					printf ("\t%s - %s\n\nUsage:\n%s\n", ccmd->name, ccmd->desc, ccmd->usage );
28
+					printf ("%s - %s\n\nUsage:\n  %s\n", ccmd->name, ccmd->desc, ccmd->usage );
29
 					break;
29
 					break;
30
 				}
30
 				}
31
 			}
31
 			}
40
 
40
 
41
 struct command help_command __command = {
41
 struct command help_command __command = {
42
 	.name = "help",
42
 	.name = "help",
43
-	.usage = "help <command>\n\n\tExample:\n\t\thelp help\n",
43
+	.usage = "help <command>\n\nExample:\n  help help\n",
44
 	.desc = "The help command",
44
 	.desc = "The help command",
45
 	.exec = cmd_help_exec,
45
 	.exec = cmd_help_exec,
46
 };
46
 };

+ 2
- 2
src/commandline/commands/nvo_cmd.c View File

41
 
41
 
42
 struct command show_command __command = {
42
 struct command show_command __command = {
43
 	.name = "show",
43
 	.name = "show",
44
-	.usage = "show\n",
44
+	.usage = "show <identifier>\n",
45
 	.desc = "Show stored options",
45
 	.desc = "Show stored options",
46
 	.exec = show_exec,
46
 	.exec = show_exec,
47
 };
47
 };
78
 
78
 
79
 struct command set_command __command = {
79
 struct command set_command __command = {
80
 	.name = "set",
80
 	.name = "set",
81
-	.usage = "set <option number> <option string>\n",
81
+	.usage = "set <identifier> <value>\n",
82
 	.desc = "Set stored option",
82
 	.desc = "Set stored option",
83
 	.exec = set_exec,
83
 	.exec = set_exec,
84
 };
84
 };

Loading…
Cancel
Save