-
Couldn't load subscription status.
- Fork 400
[waiting for #1485] fix(java,rsync,scp): handle quoted space in filepaths properly #1357
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
base: main
Are you sure you want to change the base?
[waiting for #1485] fix(java,rsync,scp): handle quoted space in filepaths properly #1357
Conversation
37a9900 to
4847f8d
Compare
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.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- completions/java: Language not supported
- completions/ssh: Language not supported
Comments suppressed due to low confidence (1)
test/t/test_rsync.py:77
- The cwd value 'scp' appears to be incorrect for an rsync test. It may be a typo and should likely be 'rsync'.
@pytest.mark.complete("rsync -na spaced\ ", cwd="scp")
|
@copilot[AI] The language of completions/java and completions/ssh are Bash.
This is a good point. Since the |
|
I tried the Copilot code review, which was released today, but I'm not sure how to respond to Copilot and get further feedback. |
4847f8d to
c052268
Compare
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.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- completions/java: Language not supported
- completions/ssh: Language not supported
Comments suppressed due to low confidence (3)
test/t/test_rsync.py:77
- The cwd parameter is set to 'scp' in a rsync test; confirm if this is intentional or if it should reference 'rsync' to avoid potential mis-routing of the test context.
@pytest.mark.complete("rsync -na spaced\ ", cwd="scp")
test/t/test_scp.py:191
- [nitpick] The expected completion string 'ced\ \ conf' is hard to interpret; consider adding a clarifying comment or refactoring the test to indicate the intended transformation explicitly.
assert completion == "ced\ \ conf"
test/t/test_scp.py:195
- [nitpick] Consider asserting an explicit expected value for completion in 'test_local_path_with_spaces_2' to ensure the test precisely validates the intended behavior.
assert completion
c052268 to
89b5600
Compare
I already added the clarifying code comment. So, Copilot does not take account of the code comment.
This is a common pattern of the test suite in this project, where the text following the already input part (i.e., "spa" in the present case) is tested. It is impractical to add clarifying comments to all the occurrences of similar tests. Ideally, we can document the global structures and conventions of our test suite somewhere, but we currently don't have the documentation at all. To document it, too many things are not explained.
Thanks, this is simply a mistake. I fixed it. |
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.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- completions/java: Language not supported
- completions/ssh: Language not supported
Comments suppressed due to low confidence (1)
test/t/test_rsync.py:77
- The cwd parameter 'scp' is likely incorrect for an rsync test; it should probably be changed to 'rsync'.
@pytest.mark.complete("rsync -na spaced\ ", cwd="scp")
793b4d8 to
b71b56e
Compare
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.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- completions/java: Language not supported
- completions/ssh: Language not supported
Comments suppressed due to low confidence (2)
test/t/test_rsync.py:77
- The cwd parameter is set to "scp" in a test within test_rsync.py; please verify if this is intentional or if it should be updated to reference the appropriate directory for rsync.
@pytest.mark.complete("rsync -na spaced\ ", cwd="scp")
test/t/test_scp.py:191
- Double-check that the expected escaped output matches the intended handling of quoted spaces, ensuring consistency with the test case logic.
assert completion == "ced\ \ conf"
b71b56e to
efb1c13
Compare
|
I added a fix for #1255 and related changes. See the commit messages for the details. |
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.
Copilot reviewed 7 out of 13 changed files in this pull request and generated no comments.
Files not reviewed (6)
- bash_completion: Language not supported
- completions/java: Language not supported
- completions/make: Language not supported
- completions/mutt: Language not supported
- completions/pkgutil: Language not supported
- completions/ssh: Language not supported
Comments suppressed due to low confidence (1)
test/t/test_rsync.py:77
- The 'cwd' parameter is set to 'scp' in an rsync test, which might be incorrect. Consider using 'rsync' as the cwd to better align with the intended test context.
@pytest.mark.complete("rsync -na spaced\\ ", cwd="scp")
38855ad to
372d499
Compare
|
Thanks @akinomyoga I have tested this and now For example if I have the two directories: |
372d499 to
ebe6554
Compare
|
@JohnVillalovos Thanks for the confirmation! |
ebe6554 to
b456d8d
Compare
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.
I'm not sure I understand everything here, so take it with a grain of salt, but this looks fine to me. Left some comments. This definitely fixes the issues with local files completions, but I still seem to have some issues with remote file:
scp localhost:/home/yedaya/dev/bash-completion/test/fixtures/scp/local_path/backslash-a<TAB>\\\
This happens also with main, so not a blocker.
b0566e5 to
8ca4fa9
Compare
1fd977d to
b796eb0
Compare
pytest.skip cancels the execution of the current test, so "return" and subsequent codes arex unreachable. We do not need to explicitly call "return" in this context. scop#1357 (comment)
b796eb0 to
621fc16
Compare
|
(rebased) |
|
Instead of lumping unrelated but conflicting/overlapping PR's together, especially as many as there are in this one, I'd suggest filing several and basing them off each other. This is a good way to optimize for the reviewers -- ones with multiple unrelated ones tend to grow large, and entail many context switches for the reviewer. For example, I could have easily reviewed and approved a few of these now and we could get them out of the way, but I cannot find time and attention to do it all now, and I'm not sure when I will. (If others do, please go ahead!) So the first PR would have branch-1 based off main, the second's branch branch-2 based off branch-1 (and set as base in the PR), etc etc. I believe for this to work the PR's need to be branches in this repo and not a fork, so this is an option directly available for people with contributor access. |
|
Thank you. Yes..., I have to agree with you that this PR happened to become too large. I usually tend to combine multiple changes in a reasonable size of a PR when I introduce many conflicting changes to avoid the complication of PR dependency and conflicts. If every tiny change is processed one by one as a PR, it would take a longer time until I forget the set of changes and their relationships. However, I admit that I failed to decide on the proper size of this PR. After some adjustments, the number of commits increased too much. I'll split the PR. |
pytest.skip cancels the execution of the current test, so "return" and subsequent codes arex unreachable. We do not need to explicitly call "return" in this context. scop#1357 (comment)
621fc16 to
c8de159
Compare
|
I submitted PR #1371.
Sorry, I missed this part, though I'm afraid that I'm possibly still missing the intent. Is the idea that another collaborator can split the PR (instead of the original submitter)? |
pytest.skip cancels the execution of the current test, so "return" and subsequent codes arex unreachable. We do not need to explicitly call "return" in this context. scop#1357 (comment)
pytest.skip cancels the execution of the current test, so "return" and subsequent codes arex unreachable. We do not need to explicitly call "return" in this context. scop#1357 (comment)
c8de159 to
b8dbbe8
Compare
b8dbbe8 to
161eb67
Compare
161eb67 to
badd677
Compare
badd677 to
fc9758a
Compare
This includes several different fixes (whose changes overlap with each other). See the respective commit messages for the details.