mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 15:05:27 +08:00
Stop rewriting the history file on every command
fish is designed to append to the history file in most cases. However save_internal_via_appending was never returning success, so we were always doing the slow rewrite path. Correctly return success. Fixes #6042
This commit is contained in:
parent
7ab291775a
commit
a87e0183df
@ -23,6 +23,7 @@
|
||||
- `switch` now allows arguments that expand to nothing, like empty variables (#5677).
|
||||
- The null command (:) now always exits successfully, rather than echoing last return code.
|
||||
- Cursor configuration instructions for vi-mode have been added to the fish documentation.
|
||||
- A bug caused fish to rewrite the history file on every command. This has been fixed: fish will append to the file in most cases (#6042).
|
||||
|
||||
### Syntax changes and new commands
|
||||
- Brace expansion now only takes place if the braces include a "," or a variable expansion, so things like `git reset HEAD@{0}` now work (#5869).
|
||||
|
@ -947,6 +947,8 @@ bool history_impl_t::save_internal_via_appending() {
|
||||
this->history_file_id = file_id_for_fd(history_fd);
|
||||
|
||||
close(history_fd);
|
||||
|
||||
ok = (err == 0);
|
||||
}
|
||||
|
||||
// If someone has replaced the file, forget our file state.
|
||||
|
Loading…
x
Reference in New Issue
Block a user