Add support for making a leading space not save to history

https://github.com/fish-shell/fish-shell/pull/615
This commit is contained in:
ridiculousfish 2013-03-10 14:25:43 -07:00
parent 6a97b45ad1
commit 4cce303c89

View File

@ -3261,12 +3261,10 @@ const wchar_t *reader_readline()
case 0: case 0:
{ {
/* /* Finished commend, execute it. Don't add items that start with a leading space. */
Finished commend, execute it if (! data->command_line.empty() && data->command_line.at(0) != L' ')
*/
if (! data->command_line.empty())
{ {
if (data->history) if (data->history != NULL)
{ {
data->history->add_with_file_detection(data->command_line); data->history->add_with_file_detection(data->command_line);
} }