Lf: Respect gitignore file

Created on 8 Jul 2019  路  7Comments  路  Source: gokcehan/lf

How do I make lf respect gitignore file?

enhancement

Most helpful comment

Is it a good idea to do that in a file manager?

It certainly isn't "as is". However, what about treating files in .gitignore as "hidden files", toggleable with zh?

All 7 comments

@pratz What do you mean by respecting? Is it like hiding files in gitignore files? Is it a good idea to do that in a file manager? I understand this can be useful for tools like grep but I'm not sure about file managers.

Ya, hiding or excluding files/directories which are in gitignore file.
For instance, all .pyc files in a project are listed with lf, which I feel is a distraction.
Would be really convenient to exclude files/directories.

Is it a good idea to do that in a file manager?

It certainly isn't "as is". However, what about treating files in .gitignore as "hidden files", toggleable with zh?

Every developers workflow is different, if ignoring files with zsh works for you, do it :)
However, I personally feel hiding/unhiding should be file manager's job instead of shell's.

This should be general mechanism that allow to use any *ignore file (dockerignore, helmignore etc.)

I think there may be a pretty simple solution for this. When hidden is set, every file in a directory should be shown. But you could let the user set a script for filehider the same way we can with previewer. That way the lf project doesn't have to implement a ton of different options, but a user can customize what is hidden when hidden isn't set. Users could have their script use a tool like fd which has lots of options and is made for this kind of stuff.

This should now be possible to implement as a custom command with hiddenfiles option and on-cd command.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itmitica picture itmitica  路  6Comments

wheatdog picture wheatdog  路  6Comments

juacq97 picture juacq97  路  6Comments

muellerto picture muellerto  路  8Comments

uppercat picture uppercat  路  5Comments