Skip to content

Commit

Permalink
v0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
eomain committed Oct 6, 2020
1 parent ca3d64f commit bf99ebc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
10 changes: 0 additions & 10 deletions ash/core/ash.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,6 @@ void ash_print_help(void)
ash_print("\n");
ash_print("INPUT:\n");
ash_print(" <SCRIPT> Shell script to execute\n");
ash_print("\n");
ash_print("SHELL COMMANDS:\n");

enum ash_command_name command;
for (size_t i = 0; i < ASH_COMMAND_NO -1; i++) {
command = (enum ash_command_name) i;
ash_command_usage(command);
ash_print("\n\n");
}
ash_command_usage(++command);
}

static void ash_set_static_var(const char *id, const char *str)
Expand Down
17 changes: 3 additions & 14 deletions ash/help.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

static const char *USAGE =
"help:\n"
" display built-in command usage\n"
" display help message\n"
"usage:\n"
" help [COMMAND]\n";
" help\n";

const char *ash_help_usage(void)
{
Expand All @@ -31,17 +31,6 @@ const char *ash_help_usage(void)

int ash_help(int argc, const char * const *argv)
{
if (argc == 1) {
ash_print_help();
return ASH_STATUS_OK;
}

enum ash_command_name command;
command = ash_command_find(argv[1]);
if (!ash_command_valid(command))
return ASH_STATUS_ERR;

ash_command_usage(command);

ash_print_help();
return ASH_STATUS_OK;
}
2 changes: 1 addition & 1 deletion include/ash/ash.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* current shell version */
#define ASH_VERSION_MAJOR "0"
#define ASH_VERSION_MINOR "2"
#define ASH_VERSION_MICRO "1"
#define ASH_VERSION_MICRO "2"

#define ASH_VERSION ASH_VERSION_MAJOR "." \
ASH_VERSION_MINOR "." \
Expand Down

0 comments on commit bf99ebc

Please sign in to comment.