-
Notifications
You must be signed in to change notification settings - Fork 2k
fix(http): add tilde expansion for --unix-socket paths #16977
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
Conversation
ysthakur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
The
--unix-socketflag in all HTTP commands now supports tilde expansion, allowing paths like~/my-service.sockto work correctly.