4 ms·
Show HN: Lq – Alternative to Ls
- mosselman 7y agoThe images in the repo should be accompanied by descriptions of what we can see. It is not obvious for most of them. I say 'should', but that is pretty relative of course. The don't have to, but in order for most people, or at least me, to understand them, they should.
- llagerlof 7y agoWhat I liked: - Nice output layout. - Separated directories, files, directory links and file links. - Full path output. - Count of objects inside directories. What would be good: - Accept filenames as arguments (just like directory is already supported). - Add an option --regex, for powerful filtering (like egrep) - Add an option --recursive and --ignore (or --exclude), allowing the user to make recursive listing while ignoring some directories. Keep up the nice work. Thanks!
- madprops 7y agoNot sure what you mean about filenames as arguments, how would a filename be listed? Added regex support for --filter. For instance --filter=re:\\d+ You mean something like what tree displays? Or just to count the items in the directory?
- llagerlof 7y ago> Not sure what you mean about filenames as arguments, how would a filename be listed? Just the name of the file, like ls. Typing lq file.txt and display nothing looks like the file doesn't exist. > Added regex support for --filter. For instance --filter=re:\\d+ God, you are fast! Thank you! > You mean something like what tree displays? Or just to count the items in the directory? Forget this silly thing. I tried using find and worked perfectly: $ find . -type d -exec echo -e "\n$ lq {}" \; -exec lq {} \;
- ktm5j 7y agoLooks cool! Checking it out now. I have a growing interest in Nim, how do you like the language? One suggestion I have is to output in justified columns for the non-list output, like how ls does.. gives me a headache to look at everything jumbled together. And one final note, having short hand command flags is necessary if you want a useful command line tool. Like '-s' short for '--salad' or '-c' for '--count' etc
- madprops 7y agoSeems making the column view is a bit tricky right now. But if I manage to do it i'll release it as a nim library itself and use it in the program. Added alt support. -s for --salad -c for --count etc. Not all commands have an alt right now.
- madprops 7y agoOh and I'm certainly liking Nim quite a bit. Recommended.