Skip to content
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

Detecting whether hidden files are active when running a plugin #1308

Closed
gzagatti opened this issue Feb 17, 2022 · 4 comments · Fixed by #1315
Closed

Detecting whether hidden files are active when running a plugin #1308

gzagatti opened this issue Feb 17, 2022 · 4 comments · Fixed by #1315

Comments

@gzagatti
Copy link

Is your feature request related to a problem? Please describe.

I have written a basic plugin that looks for directories and then switches to the selected one, similar to fzcd

Describe the solution you'd like

I would like the plugin to know whether hidden files are active or not. If so, then I would include hidden directories in my search.

Describe alternatives you've considered

Mapping two different keys to two variations of the plugin.

Additional context

My plugin is very simple. It can be found here.

@KlzXS
Copy link
Collaborator

KlzXS commented Feb 17, 2022

I see you've already prepared it for accepting INCLUDE_HIDDEN. @jarun I think it would be simple enough to always set the variable when calling the function (and showing hidden files), currently we only do it on batch rename. Are we okay with that?

@N-R-K
Copy link
Collaborator

N-R-K commented Feb 17, 2022

If we do decide to make it available to all plugins, I think it'd make sense to prefix it with NNN_. So $NNN_INCLUDE_HIDDEN , just in case it doesn't collide with other preexisting env var.

@gzagatti
Copy link
Author

Having an environment variable like $NNN_INCLUDE_HIDDEN that toggles according to whether hidden files are visible or not in nnn would completely solve my issue.

@jarun
Copy link
Owner

jarun commented Feb 19, 2022

@KlzXS yes, please add the support.

N-R-K added a commit to N-R-K/nnn that referenced this issue Feb 22, 2022
N-R-K added a commit to N-R-K/nnn that referenced this issue Feb 22, 2022
@jarun jarun mentioned this issue Feb 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2022
cgxxv pushed a commit to cgxxv/nnn that referenced this issue May 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants