revert(zsh): remove 'fc -RI' call in the history widget #4093
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Intentionally added to solve an issue with updating the
history
array, whichonly updated after the user ran a non-empty command12.
There were a couple of issues:
One issue was that executing
fc -RI
seemed to prevent access to recent historywhen canceling the
fzf
window withesc
orctrl-c
. Pressingup
did notretrieve the expected history. This was mitigated by placing it inside the
command substitution3. However, this led to the issue described in the
referenced ticket.
In the past4, it was even reported that there was an unbearable delay when
using
fc -RI
.Footnotes
ctrl+r no longer pulling from shared history until a command is run succesfully · Issue #4061 · junegunn/fzf · GitHub ↩
fix(zsh): history loading with shared option by LangLangBart · Pull Request #4071 · junegunn/fzf · GitHub ↩
fix(zsh): move 'fc -RI' inside command substitution by LangLangBart · Pull Request #4073 · junegunn/fzf · GitHub ↩
[zsh] Reload shared history before searching by mpolden · Pull Request #2251 · junegunn/fzf · GitHub ↩