Changeset 42914
- Timestamp:
- Aug 24, 2025, 11:54:49 AM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-unions-20250528/Ohana/src/opihi/lib.shell/opihi.c
r40652 r42914 4 4 int opihi (int argc, char **argv) { 5 5 6 int Nbad;7 6 char *line, *prompt, *history; 8 7 pid_t ppid; … … 15 14 welcome (); 16 15 17 Nbad = 0; 16 // if HISTORY is defined, and does not have the value NONE, save history 17 int SaveHistory = TRUE; 18 if (!history || !strcasecmp(history, "none")) { SaveHistory = FALSE; } 19 20 int Nbad = 0; 18 21 while (1) { /** must exit with command "exit" or "quit" */ 19 22 if (Nbad == 10) exit (20); … … 40 43 if (*line) { 41 44 multicommand (line); 42 add_history (line);45 if (SaveHistory) { add_history (line); } 43 46 44 47 // the libedit version of readline does not support an incremental write to history file 45 48 # ifdef RL_READLINE_VERSION 46 if ( history != NULL) append_history (1, history);49 if (SaveHistory) { append_history (1, history); } 47 50 # endif 48 51
Note:
See TracChangeset
for help on using the changeset viewer.
