Skip to main content

Module history

Module history 

Source

Structs§

HistoryEntry

Constants§

HISTORY_ENTRY_CAP
Maximum number of history entries retained per project.
LOG_FILE_CAP
Maximum number of log files retained per project.

Functions§

history_dir
Returns the default history directory: ~/.config/xtui/history/.
load_history
Loads the history for project from <base>/<project>.json.
prune_logs
Deletes the oldest log files in <base>/<project>/ when there are more than 100.
save_entry
Appends entry to <base>/<project>.json, capping the list at 50 entries.
save_output
Writes output lines to <base>/<project>/<timestamp>-<command>.log.