Skip to content

Fix open path prompt not showing hidden files#46965

Merged
SomeoneToIgnore merged 7 commits intozed-industries:mainfrom
austincummings:main
Jan 31, 2026
Merged

Fix open path prompt not showing hidden files#46965
SomeoneToIgnore merged 7 commits intozed-industries:mainfrom
austincummings:main

Conversation

@austincummings
Copy link
Contributor

@austincummings austincummings commented Jan 16, 2026

Closes #39036

The open path prompt will now show hidden files when "." is entered. Also fixes an issue with "open this directory" showing twice when used by the "toolchain: add toolchain" prompt.

With a tree of

zed-industries
├── .hidden
├── .hidden-file
├── zed
├── zed-working
├── zeta
└── zeta-dataset

Before:
image

After (current directory view without inputting "."):
image

After (when inputting "." to see hidden entries):
image

Release Notes:

  • Made Zed's built in file picker to show all hidden files by default

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 16, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jan 16, 2026
@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Jan 22, 2026

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against 8c42005

Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

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

My main concern with the approach is the absence of transparency: how a user is supposed to guess they have to input . first?

What if we return back all show_hidden functionality and always enable that for the path prompt instead?

@SomeoneToIgnore SomeoneToIgnore self-assigned this Jan 22, 2026
@austincummings
Copy link
Contributor Author

Good point, it isn't very discoverable like this. I did remember at one point Zed had similar behavior so I went back to find the behavior. It looks like it used to in v0.190.0 behave similarly, however it required a . and then at least one other character to show the dotfiles. This video is from just prior to #32014.

I'm happy to add back the show_hidden and enable it though, just let me know!

2026-01-22.11-06-23.mp4

Commit SHA: 8c46a4f594b496fd666b8357a205ff228846d136

@SomeoneToIgnore
Copy link
Contributor

cc @danilo-leal if you have any ideas.

I propose to show all by default and alter the tests correspondingly, if Danilo won't propose anything in a week.
To me, the old behavior is similarly not discoverable, but I might miss a knowledge about editors that do this.

@SomeoneToIgnore
Copy link
Contributor

#47983 had been merged recently, and it should have changed the way should_hidden is treated in the prompt?

The open path prompt will now show hidden files when "." is entered. Also fixes
an issue with "open this directory" showing twice when used by the
"toolchain: add toolchain" prompt.
@austincummings
Copy link
Contributor Author

#47983 had been merged recently, and it should have changed the way should_hidden is treated in the prompt?

Sounds good! I updated the behavior to show the hidden entries by default as well. Just need to fix up the tests now I think.

@austincummings
Copy link
Contributor Author

austincummings commented Jan 30, 2026

@SomeoneToIgnore these tests should be good to go now. Looking at them still

@austincummings
Copy link
Contributor Author

Ok all good to go now!

@SomeoneToIgnore
Copy link
Contributor

SomeoneToIgnore commented Jan 30, 2026

A few more windows-related ones (as those are definitely not dealing with dot-starting hidden files) to fix, and we're good to go!

…idden`)

`Path::file_name()` returns `None` for `.` and `..`, and strips the leading
dot from dotfiles. Replace it with manual separator splitting so the suffix
is preserved correctly for both Posix and Windows path styles.

Also merge the two `cfg`-gated implementations into a single function, since
the only difference was Windows separator handling which works on all platforms.
Include the separator character in the dir portion when splitting, rather
than stripping it and unconditionally appending `\`. This preserves forward
slashes when the user types `C:/root/` style paths.
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

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

Thank you, let's see how this will be recepted, but the change itself looks nice.

@SomeoneToIgnore SomeoneToIgnore merged commit 795eb34 into zed-industries:main Jan 31, 2026
28 checks passed
@austincummings
Copy link
Contributor Author

Thank you, let's see how this will be recepted, but the change itself looks nice.

Thanks for your review and your patience dealing with those test runs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hidden folders are not visible in the built-in picker

3 participants