From ca61d0ee8bd5e732b87d8b4b2e748c27e4c7d31f Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Sun, 10 Jun 2012 01:08:19 +0530 Subject: [PATCH] Fixed crash in history builtin for inputs like : history --search -prefix "echo" --- builtin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin.cpp b/builtin.cpp index c31b0ad96..959fc8437 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -3622,7 +3622,7 @@ static int builtin_history( parser_t &parser, wchar_t **argv ) woptind = 0; history_t *history = reader_get_history(); - while((opt = wgetopt_long( argc, argv, L"pdsc", long_options, &opt_index )) != -1) + while((opt = wgetopt_long_only( argc, argv, L"pdscvl", long_options, &opt_index )) != -1) { switch(opt) {