Skip to content
Myr

bash: shift-delete to delete history entries during CTRL-R

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #4715

authored by Junegunn Choi · committed by Junegunn Choi · parent b638ff4 · Browse files · 3 files+71 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+71 added−7 removed

  • tests:+44 added−0 removed
  • other:+27 added−7 removed

3 files+71 added−7 removed

modified:shell/key-bindings.bash+24 added-6 removed
modified:test/test_shell_integration.rb+44 added
830 unmodified lines
831 tmux.send_keys "FZF_TMUX=1 #{Shell.bash}", :Enter832 tmux.prepare833 end834835 def test_ctrl_r_delete836 tmux.prepare837 tmux.send_keys 'echo to-keep', :Enter838 tmux.prepare839 tmux.send_keys 'echo to-delete-1', :Enter840 tmux.prepare841 tmux.send_keys 'echo to-delete-2', :Enter842 tmux.prepare843 tmux.send_keys 'echo another-keeper', :Enter844 tmux.prepare845846 # Open Ctrl-R and delete two entries847 tmux.send_keys 'C-r'848 tmux.until { |lines| assert_operator lines.match_count, :>, 0 }849 tmux.send_keys 'to-delete'850 tmux.until { |lines| assert_equal 2, lines.match_count }851 # Delete the first match852 tmux.send_keys 'S-Delete'853 tmux.until { |lines| assert_equal 1, lines.match_count }854 # Delete the second match855 tmux.send_keys 'S-Delete'856 tmux.until { |lines| assert_equal 0, lines.match_count }857 # Exit without selecting858 tmux.send_keys :Escape859 tmux.prepare860861 # Verify deleted entries are gone from history862 tmux.send_keys 'C-r'863 tmux.until { |lines| assert_operator lines.match_count, :>, 0 }864 tmux.send_keys 'to-delete'865 tmux.until { |lines| assert_equal 0, lines.match_count }866 tmux.send_keys :Escape867 tmux.prepare868869 # Verify kept entries are still there870 tmux.send_keys 'C-r'871 tmux.until { |lines| assert_operator lines.match_count, :>, 0 }872 tmux.send_keys 'to-keep'873 tmux.until { |lines| assert_equal 1, lines.match_count }874 tmux.send_keys :Enter875 tmux.until { |lines| assert_equal 'echo to-keep', lines[-1] }876 tmux.send_keys 'C-c'877 end878879 def test_dynamic_completion_loader880 tmux.paste 'touch /tmp/foo; _fzf_completion_loader=1'881 tmux.paste '_completion_loader() { complete -o default fake; }'882 tmux.paste 'complete -F _fzf_path_completion -o default -o bashdefault fake'
218 unmodified lines
modified:CHANGELOG.md+3 added-1 removed
23 unmodified lines
24 [8T] baseline: 32.82ms current: 17.79ms (1.84x) matches: 179966 (12.79%)25 ```26 - Improved the cache structure, reducing memory footprint per entry by 86x.27 - With the reduced per-entry cost, the cache now has broader coverage.28- Shell integration improvements29 - bash: Press `shift-delete` to delete history entries during CTRL-R search (#4715)28- fish: Improved command history (CTRL-R) (#4703) (@bitraid)30 - fish: Improved command history (CTRL-R) (#4703) (@bitraid)31- `GET /` HTTP endpoint now includes `positions` field in each match entry, providing the indices of matched characters for external highlighting (#4726)32- Bug fixes33 - `--walker=follow` no longer follows symlinks whose target is an ancestor of the walker root, avoiding severe resource exhaustion when a symlink points outside the tree (e.g. Wine's `z:` → `/`) (#4710)34 - Fixed AWK tokenizer not treating a new line character as whitespace
3210 unmodified lines