Conversation
ChrisPenner
commented
Oct 27, 2025
Comment on lines
+237
to
+241
| scratch/main> debug.tab-complete "vi | ||
|
|
||
| view | ||
| view.global | ||
| ``` |
Member
Author
There was a problem hiding this comment.
It doesn't show in the debug output, but the actual completion will add the closing quotes, i.e. the first result would end up as "view"
144e9da to
1964241
Compare
1964241 to
ba8c2ce
Compare
ChrisPenner
commented
Oct 27, 2025
Comment on lines
+20
to
+23
| -- * Parse Arguments | ||
| parseArgs, | ||
| parseArgsQuoted, | ||
|
|
Member
Author
There was a problem hiding this comment.
I dunno the right module for these; Open to change if anyone cares 🤷🏼♂️
Member
Author
|
@aryairani I looked into preventing numbered arg expansion when quoted, I'd like to do it but it adds a bit more complexity so I think we should merge this one then I can add that in a new PR. EDIT: here |
1 task
aryairani
approved these changes
Oct 29, 2025
Contributor
|
@ChrisPenner I forgot to ask, how do we escape a |
Member
Author
|
@aryairani standard backslash; |
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.
Overview
Allows passing quoted args to ucm commands.
Motivated by the desire to use this for
config.set-authorandannotatefixes #5417
quote-args.mp4
Implementation notes
Interesting/controversial decisions
There is a
completeQuotedWordin Haskeline, but it doesn't provide the line prefix (which we need for determining the command).Plus, writing our own parser means we can be consistent between the line parser and the completion parser.
Test coverage
Added a transcript for completion and a simple unison prog which demos quoted args to
run.Loose ends
runhahaI'm sure we'll find some more tweaks for this in the future, but shouldn't be hard to add those as they come up.