Repository navigation
feat(commands): add vim-style shell range filters - #340
Merged
Merged
Conversation
fcoury
force-pushed
the
fcoury/ex-shell-filters
branch
from
August 24, 2026 16:19
cb911d2 to
b9afb1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
#338 added standalone
:!shell execution, but common Vim workflows still could not send buffer text to an external formatter, sort a visual selection, or replace a specific line range with command output.What Changed
:%!command, numeric:2,5!command, and last-Visual:'<,'>!commandfilters while preserving existing shell expansion and previous-command history.:bufdo; update compatibility and detach documentation.How to Test
Open a file containing unsorted lines, run
:%!sort, and confirm the entire buffer is sorted. PressuandCtrl-rto verify the filter is one undoable change.Select several lines with characterwise, linewise, or blockwise Visual mode; press
:and enter!sort. Confirm only the prefilled'<,'>range changes. Also verify a numeric range such as:2,4!sort.Run
:%!sh -c 'cat; printf rejected >&2; exit 7'and confirm the buffer is unchanged while:messagesreports the failure. Run:%!sleep 30and pressCtrl-cin Messages to verify cancellation also preserves the buffer.Run the focused regression tests: