2016-04-18 05:47:37 +00:00
|
|
|
// Prototypes for history functions, part of the user interface.
|
2005-10-04 15:11:39 +00:00
|
|
|
#ifndef FISH_HISTORY_H
|
|
|
|
#define FISH_HISTORY_H
|
|
|
|
|
2015-07-25 15:14:25 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <time.h>
|
2016-11-15 05:31:51 +00:00
|
|
|
#include <wctype.h>
|
2017-02-14 04:37:27 +00:00
|
|
|
|
2022-08-21 06:14:48 +00:00
|
|
|
#include <algorithm>
|
2016-04-18 05:47:37 +00:00
|
|
|
#include <deque>
|
2016-05-03 23:23:30 +00:00
|
|
|
#include <memory>
|
2015-07-25 15:14:25 +00:00
|
|
|
#include <string>
|
2018-01-31 02:30:30 +00:00
|
|
|
#include <unordered_map>
|
|
|
|
#include <unordered_set>
|
2016-04-18 05:47:37 +00:00
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
2016-04-21 06:00:54 +00:00
|
|
|
|
2016-04-18 05:47:37 +00:00
|
|
|
#include "common.h"
|
2022-08-21 06:14:48 +00:00
|
|
|
#include "maybe.h"
|
2016-04-21 06:00:54 +00:00
|
|
|
#include "wutil.h" // IWYU pragma: keep
|
2012-02-06 00:42:24 +00:00
|
|
|
|
2021-12-12 21:36:14 +00:00
|
|
|
using path_list_t = std::vector<wcstring>;
|
|
|
|
using history_identifier_t = uint64_t;
|
2014-03-29 06:22:03 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
#if INCLUDE_RUST_HEADERS
|
2015-09-19 03:47:38 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
#include "history.rs.h"
|
2012-11-18 10:23:22 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
#else
|
2014-07-25 17:08:21 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
struct HistoryItem;
|
2014-03-31 17:01:39 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
class HistorySharedPtr;
|
|
|
|
enum class PersistenceMode;
|
|
|
|
enum class SearchDirection;
|
|
|
|
enum class SearchType;
|
2018-01-31 02:30:30 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
#endif // INCLUDE_RUST_HEADERS
|
2017-09-14 22:44:17 +00:00
|
|
|
|
2023-10-08 21:22:27 +00:00
|
|
|
using history_item_t = HistoryItem;
|
|
|
|
using history_persistence_mode_t = PersistenceMode;
|
|
|
|
using history_search_direction_t = SearchDirection;
|
|
|
|
using history_search_type_t = SearchType;
|
|
|
|
using history_search_flags_t = uint32_t;
|
2012-02-06 00:42:24 +00:00
|
|
|
|
2018-08-12 07:30:57 +00:00
|
|
|
/// Flags for history searching.
|
|
|
|
enum {
|
2021-12-12 21:36:14 +00:00
|
|
|
/// If set, ignore case.
|
2018-08-12 07:30:57 +00:00
|
|
|
history_search_ignore_case = 1 << 0,
|
|
|
|
|
2021-12-12 21:36:14 +00:00
|
|
|
/// If set, do not deduplicate, which can help performance.
|
2018-08-12 07:30:57 +00:00
|
|
|
history_search_no_dedup = 1 << 1
|
|
|
|
};
|
|
|
|
using history_search_flags_t = uint32_t;
|
|
|
|
|
2005-10-04 15:11:39 +00:00
|
|
|
#endif
|