File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13.4 FATAL_ERROR)
4
4
# ======================================================================================================================
5
5
6
6
# project
7
- project (stdin-to-modbus-shm LANGUAGES CXX VERSION 1.1.2 )
7
+ project (stdin-to-modbus-shm LANGUAGES CXX VERSION 1.1.3 )
8
8
9
9
# settings
10
10
set (Target "stdin-to-modbus-shm" ) # Executable name (without file extension!)
Original file line number Diff line number Diff line change @@ -422,11 +422,11 @@ int main(int argc, char **argv) {
422
422
continue ;
423
423
}
424
424
425
+ if (!line.empty () && !VALID_HIST) add_history (line.c_str ());
425
426
} else {
426
427
if (!std::getline (std::cin, line)) break ;
427
428
}
428
429
429
- if (!line.empty () && !VALID_HIST) add_history (line.c_str ());
430
430
431
431
// parse input
432
432
std::vector<InputParser::Instruction> instructions;
@@ -437,7 +437,7 @@ int main(int argc, char **argv) {
437
437
continue ;
438
438
}
439
439
440
- if (VALID_HIST) add_history (line.c_str ());
440
+ if (INTERACTIVE && VALID_HIST) add_history (line.c_str ());
441
441
442
442
// write value to target
443
443
std::lock_guard<std::mutex> guard (m);
@@ -543,6 +543,8 @@ int main(int argc, char **argv) {
543
543
}
544
544
}
545
545
}
546
+
547
+ rl_clear_history ();
546
548
terminate = true ;
547
549
};
548
550
You can’t perform that action at this time.
0 commit comments