GNU History Library. Node: History List Management
Initializing History and State Management
History Functions
Information About the History List
2.3.2: History List Management
These functions manage individual entries on the history list, or set
parameters managing the list itself.
- Function: void add_history
(char *string)
-
Place string at the end of the history list. The associated data
field (if any) is set to
NULL
.
- Function: HIST_ENTRY * remove_history
(int which)
-
Remove history entry at offset which from the history. The
removed element is returned so you can free the line, data,
and containing structure.
- Function: HIST_ENTRY * replace_history_entry
(int which, char *line, char *data)
-
Make the history entry at offset which have line and data.
This returns the old entry so you can dispose of the data. In the case
of an invalid which, a
NULL
pointer is returned.
- Function: void clear_history
()
-
Clear the history list by deleting all the entries.
- Function: void stifle_history
(int max)
-
Stifle the history list, remembering only the last max entries.
- Function: int unstifle_history
()
-
Stop stifling the history. This returns the previous amount the
history was stifled. The value is positive if the history was
stifled, negative if it wasn't.
- Function: int history_is_stifled
()
-
Returns non-zero if the history is stifled, zero if it is not.
Initializing History and State Management
History Functions
Information About the History List