luukvbaal / nnn.nvim

File manager for Neovim powered by nnn.
BSD 3-Clause "New" or "Revised" License
422 stars 9 forks source link

Opening nvim inside hidden folder makes nnn show hidden files by default #89

Closed Yutsuten closed 1 year ago

Yutsuten commented 1 year ago

I noticed that when I open nvim inside a hidden folder (say .test/), and open nnn with :NnnExplorer or :NnnPicker, hidden files will be shown by default (like when you press . within nnn).

Is this the expected behavior? Am I able to disable it? I'd like to have hidden files always hidden unless I explicit​ly press ..

luukvbaal commented 1 year ago

Hmm this seems to just be nnn's behavior when supply a PATH argument that is a hidden folder (which we do in case a PATH argument is passed to :NnnExplorer/Picker, and use getcwd() otherwise).

See e.g. just nnn vs nnn . in your shell in hidden folder, the former will have hidden mode disabled while the latter will have it enabled.

We might be able to instead just use an empty string for the path argument rather than getcwd(), I believe that would fix this issue. The current-directory should be used by default in termopen() anyways.

Yutsuten commented 1 year ago

Thank you!!