fish-shell / fish-shell/fish-shell

history isn't shown if your system clock is set wrong

Open
#6,606 3 comments 1 reaction 1 assignee Claimed by @ridiculousfish View on GitHub
bug
Dominant language
Rust
Stars
34.2k
Forks
2.4k
Avg merge
2d 8h
Merged PRs (30d)
13

Description

fish wants to use a single history file, but also ignore item from other sessions that were ran after this session was started. To achieve this it compares the item's timestamp against the current clock. The problem is that if the clock is invalid or set backwards, then old items may appear new and will be ignored.

The real problem is that fish ever re-reads the file. What ought to happen is that fish uses whatever is in the file at session startup or when `history merge` is run, and then ignores the timestamp.

Credit to @travankor for [pointing this out](https://github.com/fish-shell/fish-shell/pull/6493#issuecomment-586066717).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.