mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
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:
parent
6a97b45ad1
commit
4cce303c89
1 changed files with 3 additions and 5 deletions
|
@ -3261,12 +3261,10 @@ const wchar_t *reader_readline()
|
|||
|
||||
case 0:
|
||||
{
|
||||
/*
|
||||
Finished commend, execute it
|
||||
*/
|
||||
if (! data->command_line.empty())
|
||||
/* Finished commend, execute it. Don't add items that start with a leading space. */
|
||||
if (! data->command_line.empty() && data->command_line.at(0) != L' ')
|
||||
{
|
||||
if (data->history)
|
||||
if (data->history != NULL)
|
||||
{
|
||||
data->history->add_with_file_detection(data->command_line);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue