Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(commands)!: add support for flags #12288

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ff980a1
refactor(shellwords): change arg handling strategy
RoloEdits Jul 12, 2024
4cb2f80
feat: add a params range hint to `TypableCommand`
RoloEdits Jan 6, 2025
c224387
refactor: transition to a Vec wrapper for Args
RoloEdits Jan 7, 2025
e92b17e
refactor: add a signature field to TypableCommands
RoloEdits Jan 7, 2025
a72436a
refactor: propgate `ParseMode` to command signature
RoloEdits Jan 7, 2025
0aa7fdd
refactor: tweak Shellwords -> Args flow
RoloEdits Jan 7, 2025
e45a46f
refactor: make `unescaped` private
RoloEdits Jan 7, 2025
c537874
test: add base variant
RoloEdits Jan 7, 2025
4d594b5
fix: only validate argument count when enacting command
RoloEdits Jan 7, 2025
bde4c6c
doc: fix examples
RoloEdits Jan 7, 2025
17202ec
refactor: tidy up the file
RoloEdits Jan 7, 2025
7f53db5
refactor: add typestate to `ArgsParser` around unescaping rules
RoloEdits Jan 8, 2025
1e974ec
feat(commands): add support for flags
RoloEdits Dec 18, 2024
9383944
test: error on unknown flag
RoloEdits Jan 8, 2025
7c4ed0f
reafactor: enable `unescape_backslashes` flag
RoloEdits Jan 8, 2025
28a857b
feat: should error on duplicate flags
RoloEdits Jan 8, 2025
24cacde
feat: add rest of primitive types for trait conversion
RoloEdits Jan 8, 2025
ff6ad34
feat: add `reverse` flag to `sort`
RoloEdits Jan 8, 2025
f7f3a84
feat!: add `all` flag to `clear-register`
RoloEdits Jan 8, 2025
38641b0
doc: tweak wording and casing for modified commands
RoloEdits Jan 8, 2025
22945ef
doc: generate command docs
RoloEdits Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions book/src/generated/typable-cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| `:buffer-close-all!`, `:bca!`, `:bcloseall!` | Force close all buffers ignoring unsaved changes without quitting. |
| `:buffer-next`, `:bn`, `:bnext` | Goto next buffer. |
| `:buffer-previous`, `:bp`, `:bprev` | Goto previous buffer. |
| `:write`, `:w` | Write changes to disk. Accepts an optional path (:write some/path.txt) |
| `:write`, `:w` | write the current buffer to its file or to <path> if specified |
| `:write!`, `:w!` | Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write! some/path.txt) |
| `:write-buffer-close`, `:wbc` | Write changes to disk and closes the buffer. Accepts an optional path (:write-buffer-close some/path.txt) |
| `:write-buffer-close!`, `:wbc!` | Force write changes to disk creating necessary subdirectories and closes the buffer. Accepts an optional path (:write-buffer-close! some/path.txt) |
Expand Down Expand Up @@ -69,8 +69,7 @@
| `:set-option`, `:set` | Set a config option at runtime.<br>For example to disable smart case search, use `:set search.smart-case false`. |
| `:toggle-option`, `:toggle` | Toggle a boolean config option at runtime.<br>For example to toggle smart case search, use `:toggle search.smart-case`. |
| `:get-option`, `:get` | Get the current value of a config option. |
| `:sort` | Sort ranges in selection. |
| `:rsort` | Sort ranges in selection in reverse order. |
| `:sort` | sort ranges in selection |
| `:reflow` | Hard-wrap the current selection of lines to a given width. |
| `:tree-sitter-subtree`, `:ts-subtree` | Display the smallest tree-sitter subtree that spans the primary selection, primarily for debugging queries. |
| `:config-reload` | Refresh user config. |
Expand All @@ -83,7 +82,7 @@
| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
| `:run-shell-command`, `:sh` | Run a shell command |
| `:reset-diff-change`, `:diffget`, `:diffg` | Reset the diff change at the cursor position. |
| `:clear-register` | Clear given register. If no argument is provided, clear all registers. |
| `:clear-register` | clear given register |
| `:redraw` | Clear and re-render the whole UI |
| `:move`, `:mv` | Move the current buffer and its corresponding file to a different path |
| `:yank-diagnostic` | Yank diagnostic(s) under primary cursor to register, or clipboard by default |
Expand Down
Loading
Loading