aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-06-12 14:17:25 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-06-12 14:20:07 +0530
commit25f9105a9776e2cf4a60c1d7c64b0f508e616246 (patch)
tree09a6b17b0c10750e40de45081e3e43c12b36cafd /builtin.cpp
parent602109bd8d8600258117fd2b3554e4fe7bd22402 (diff)
Made history --help show history man page and history is now saved only once while deleting items
Diffstat (limited to 'builtin.cpp')
-rw-r--r--builtin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin.cpp b/builtin.cpp
index 959fc843..393cb308 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -3614,6 +3614,7 @@ static int builtin_history( parser_t &parser, wchar_t **argv )
{ L"contains", required_argument, 0, 'c' },
{ L"save", no_argument, 0, 'v' },
{ L"clear", no_argument, 0, 'l' },
+ { L"help", no_argument, 0, 'h' },
{ 0, 0, 0, 0 }
};
@@ -3646,6 +3647,10 @@ static int builtin_history( parser_t &parser, wchar_t **argv )
case 'l':
clear_history = true;
break;
+ case 'h':
+ builtin_print_help( parser, argv[0], stdout_buffer );
+ return STATUS_BUILTIN_OK;
+ break;
case '?':
append_format(stderr_buffer, BUILTIN_ERR_UNKNOWN, argv[0], argv[woptind-1]);
return STATUS_BUILTIN_ERROR;