fix(http): add tilde expansion for --unix-socket paths#16977
Conversation
ysthakur
left a comment
There was a problem hiding this comment.
Thanks for this. Haven't studied the completer.rs changes too closely, but this should be split into two PRs: one for the completion changes and one for the http get changes. It doesn't seem like either change is dependent on the other.
|
Thanks for the fix. I also noticed this problem while reviewing #16859 There're hard conflicts between these 2 PRs, and I'm planning on a shared completer for both positional args and flag values after #16859 . Hopefully we can get all those things done before the next release. So I think we'll on-hold merging of this one, if you don't mind. |
|
Yeah I'd recommend modifying this PR to only modify |
|
Thank you @blindFS & @ysthakur for giving this a look over! @blindFS just to clarify: the change you are planning will also provide a default completion for flag arguments which have a File and Directory shape? amazing if so! and yea, if that is the case, I'll just make this PR handle expanding the path for the http commands |
Yes, just as what it does for positional/normal arguments now. And the benefit is that if we add support for other types, e.g. bool, list, record (consider a snippet like expansion), in the future. It will work automatically for both flag values and normal args. |
amazing 🙌 |
Keep only the tilde expansion for --unix-socket flag. The general filepath completion feature will be proposed separately.
|
Would be nice to have a test case for the socket path expansion. |
|
@blindFS test added. |
ysthakur
left a comment
There was a problem hiding this comment.
LGTM, thanks. Just make sure to add a release note summary to your PR
…letion results (#17006) First step of [this](#16859 (comment)), mainly to reuse the type-based completions for flag values, as reported in #16977 . And some complement test cases. @WindSoilder @ysthakur ## Release notes summary - What our users need to know Fixed a bug where path/glob/directory typed flags don't get completions. ## Tasks after submitting
Release notes summary - What our users need to know
No detail needed for release notes: this is a bug fix for #16907
more detail
The
--unix-socketflag in all HTTP commands now supports tilde expansion, allowing paths like~/my-service.sockto work correctly.