Repository navigation
Conversation
|
Although I agree that the calculation of the |
|
ah, i'm sorry. there are so many edge-cases here and I only tested against my setup and against a reduced HISTSIZE. I thought the clamp is unnecessary here, because even at HISTSIZE smaller than the HISTFILESIZE it was duplicated before but didn't add duplicates after removing the truncation. but there seems to be cases it is necessary. I'll push an updated try combining #723 and this together. However, you are certainly much more qualified to reason about this than I am. |
|
I don't remember the details when I introduced this in commit 7be255c, but you actually may be correct. Regardless of |
|
Dropping it does break if the history grows before ble.sh reads the history. I'm working on a combined fix right now and will push it soon. It's a lot more code now though. I will leave a lot of comments so you have an easier time adapting to what i got wrong |
394dd70 to
5af45bc
Compare
|
New attempt with rskip now counting entries instead of lines, which should be consistent with wskip and with how bash handles this itself. I added a test file. on master 29 of the 41 tests fail. with my fixes all 41 pass. Disclaimer: this was written with claude code. I tried to verify what I can, but I'm not deep into bash or the ble.sh source. if you would rather throw it away, that's reasonable. it should at least give you an idea about what's wrong and could fix it. |
|
looks like i introduced a new bug. i'll push another update soon |
|
I tripped over #725 in testing, which happens on master too. this seems to work fine |
|
i found one more history bug. i build on top of this branch so i can't open it here yet: btw: thanks for this great project. i love it and recommend it to all colleagues! best way to get modern cli feeling while being bash compatible (by using bash 😆 ). それから、大阪大学の助教をされていると知りました!すごいですね!実は私も大阪大学大学院情報科学研究科に交換留学で一学期間在籍していました。もし鬼塚先生にお会いする機会があれば、ドイツの Dennis がよろしく言っていたとお伝えください |
When enabling HISTTIMEFORMAT this check clamped the history. This caused ble.sh to re-read half of the history on the first history search. Removing the clamps removes the issue.
Use
bleopt prompt_rps1='\q{history-index}/\q{history-percentile}'to make it obserableBefore the fix: Open a new tab. Check number. Press search. Number goes up by 50% to 100% (depending on size due to clamp).
After fix: no additional entries.