diff options
author | Jeff Kowalski <jeff.kowalski@gmail.com> | 2015-09-18 20:47:38 -0700 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2015-10-16 07:40:04 +0800 |
commit | b13f0701a45f45568060d7dd7a5fed1052e9be60 (patch) | |
tree | 24cac88123bff414b110a64e211a0ae6705d25d6 /src/history.h | |
parent | 4c2cc384d28f039a96d1ec60521deacdbfe220a4 (diff) |
Migrate fish_history from config to data dir
New implementation of migration code within the history_t class will
copy the contents of the old fish_history found in the config directory
to its new location in the data directory. The old file is left intact.
This is done only in the event that a fish_history is not already found in
the data directory ($XDG_DATA_HOME/fish or ~/.local/share/fish).
Diffstat (limited to 'src/history.h')
-rw-r--r-- | src/history.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/history.h b/src/history.h index 7f04890e..63372ba0 100644 --- a/src/history.h +++ b/src/history.h @@ -64,7 +64,7 @@ private: /** Paths that we require to be valid for this item to be autosuggested */ path_list_t required_paths; - + public: const wcstring &str() const { @@ -141,7 +141,7 @@ private: /** Whether we have a pending item. If so, the most recently added item is ignored by item_at_index. */ bool has_pending_item; - + /** Whether we should disable saving to the file for a time */ uint32_t disable_automatic_save_counter; @@ -222,7 +222,7 @@ public: /** Add a new pending history item to the end, and then begin file detection on the items to determine which arguments are paths */ void add_pending_with_file_detection(const wcstring &str); - + /** Resolves any pending history items, so that they may be returned in history searches. */ void resolve_pending(); @@ -236,6 +236,9 @@ public: /** Irreversibly clears history */ void clear(); + /** Populates from older location ()in config path, rather than data path) */ + void populate_from_config_path(); + /** Populates from a bash history file */ void populate_from_bash(FILE *f); |