Skip to content

Conversation

@jmou
Copy link
Contributor

@jmou jmou commented Dec 28, 2025

Fixes #1527 (edit by akinomyoga)

@jmou
Copy link
Contributor Author

jmou commented Dec 28, 2025

For some reason test_cdable_vars fails on my setup with or without my change, but it seems unrelated.

@akinomyoga
Copy link
Collaborator

For some reason test_cdable_vars fails on my setup with or without my change, but it seems unrelated.

Fixes are included as 7395885 and 8899a06 in #1530

assert completion == ["foo1", "foo2"]

@pytest.mark.complete(
"cd ", cwd="shared/empty_dir", env=dict(CDPATH=":../default")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this, we're testing we no longer complete anything from / which is good. I think it would be even better if we'd cwd somewhere that has subdirs, in order to test that we actually do offer completions from that dir due to the empty entry?

@jmou
Copy link
Contributor Author

jmou commented Dec 30, 2025

Good point, I switched them around. I don't see any other directories in shared with subdirectories, so it's now only testing completion from the empty CDPATH entry and not the second entry. I'm happy to change the second CDPATH entry to another directory with subdirectories, if someone can suggest an appropriate directory to depend on for this test.

Rebased with the fix for test_cdable_vars

@scop
Copy link
Owner

scop commented Dec 30, 2025

I think we can use for example shared/ as the other dir, no need to make it fancier than that. (It does contain bin/ which is a thing in / too, but I don't think that's a problem.)

@jmou
Copy link
Contributor Author

jmou commented Dec 31, 2025

Updated

Copy link
Owner

@scop scop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@scop scop merged commit 6f1eba6 into scop:main Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty string entry in CDPATH completes from /

3 participants