ソースを参照

Make help output more cisco-like

git-svn-id: https://klish.googlecode.com/svn/trunk@367 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 年 前
コミット
a7c7cb68ad
4 ファイル変更3 行追加4 行削除
  1. 1 1
      clish/command/command.c
  2. 1 1
      clish/param/param.c
  3. 1 1
      clish/shell/shell_help.c
  4. 0 1
      clish/shell/shell_tinyrl.c

+ 1 - 1
clish/command/command.c

@@ -220,7 +220,7 @@ void clish_command_help(const clish_command_t * this, const char * viewid,
 
 	/* Line has no any parameters */
 	if (strlen(line) <= strlen(name)) {
-		fprintf(stderr, "%s  %s\n", name,
+		fprintf(stderr, "  %s  %s\n", name,
 			clish_command__get_text(this));
 		return;
 	}

+ 1 - 1
clish/param/param.c

@@ -173,7 +173,7 @@ void clish_param_help(const clish_param_t * this, size_t offset)
 			name = clish_ptype__get_name(this->ptype);
 	}
 
-	fprintf(stderr, "%s %*c%s",
+	fprintf(stderr, "  %s %*c%s",
 		name, (int)(offset - strlen(name)), ' ', this->text);
 	if (NULL != range) {
 		fprintf(stderr, " (%s)", range);

+ 1 - 1
clish/shell/shell_help.c

@@ -70,7 +70,7 @@ available_commands(clish_shell_t * this, const char *line, bool_t full)
 		} else {
 			name = clish_command__get_suffix(cmd);
 		}
-		fprintf(stderr, "%-*s  %s\n",
+		fprintf(stderr, "  %-*s  %s\n",
 		       (int)max_width, name, clish_command__get_text(cmd));
 	}
 	/* cleanup */

+ 0 - 1
clish/shell/shell_tinyrl.c

@@ -34,7 +34,6 @@ static bool_t clish_shell_tinyrl_key_help(tinyrl_t * this, int key)
 		/* get the context */
 		context_t *context = tinyrl__get_context(this);
 
-		tinyrl_crlf(this);
 		tinyrl_crlf(this);
 		clish_shell_help(context->shell, tinyrl__get_line(this));
 		tinyrl_crlf(this);