dborzov/lsp

No way to hide hidden files

perimosocordiae opened this issue · 7 comments

ls hides hidden files by default, and has an ls -a option to show them. lsp seems to always display hidden files.

Yeah, I am still thinking about how to approach this best. I am not sure if I want to just replicate the ls behaviour.

In my experience I often actually pretty interested in the dotfiles (ones starting with .) when I am using shell: I end up reaching for .gitignore, .ssh or .bash_profile almost daily.

On the other hand, there is plenty of files I would rather not see by default. Like all the preprocessed things programming language tools tend to generate. Simplest example, if there is a script.py (Python file) and script.pyc (so called Compiled Python File) I would rather not see script.pyc by default. I would like to see if there is an orphaned pyc file without the correponding py file however as this is something I may want to know. And so on.

The program could have an ignore list similar to a .gitignore.

You could have .* *.pyc *.o etc be ignored and then throw in !.gitignore !.ssh !.bash_profile to have them not ignored and a -a command line switch to ignore the ignore list and just list everything

I would prefer a section of 'Hidden Files' and a section for 'Generated Files' that could be turned off with command line flags. A ingore list seems like a hassle to keep track of.

@rampantmonkey I like this suggestion and am going to go with it.

@apbryan I believe tools such as this should not have any configurable parts (let alone ignore lists). The idea is to have a small boring predictable tool that does one thing well.

What are you going to make the default display mode (on/off) for these sections? I would lean towards off to minimize clutter.

I would rather show all the files by default. Hiding them is confusing to people who are not aware of the concept of hidden files and everyone else can just use shell aliases to redefine the default behaviour to their own liking.

And truly casual users don't use command line tools.

Sounds good to me. Can you put that sentiment (use aliases if you don't like the defaults) in the readme? It would be nice to have the philosophy of the project in an obvious place.