-
Notifications
You must be signed in to change notification settings - Fork 3
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
Sorting order #5
Comments
Believe it or not, I only just saw this issue minutes ago! Deepest apologies for not seeing it and responding sooner. I have reproduced the behavior with the It works as you expect with a much simpler |
A more thorough explanation - this is not an actual bug, but perhaps poor documentation and/or a limitation of a (documented in the --help) heuristic. The issue is that the So, if you run I made the default config use It's worth saying that it is near human like linguistic intelligence to know that "T. " is some "initial" inside a title and not anything related to a file type or that "2.0" is embedded and not part of, say, a software version number. That caveat being made, really, I'm open to a PR along those lines, if you want to try. { I'd guesstimate that it's about 10X simpler than that hyperlink PR you did.. although it is also about 50X harder than just changing the case of E in your default config. ;-) } |
I should also have said that even with that new mentioned multi-level from the end feature, your specific example would still break since your But I fully acknowledge for many users lowercase 'e' is likely to be a less confusing default. We can switch the default config to that, if you want. What I personally do is just toss on a |
im fine with changing my config. problem for me is that im just changing magic symbols, i still have no idea what the order string means and what can i even set it to. i guess the real issue here was that i have no clue what im doing or what is the true or possible meaning of the config, even if its the only file listing program i've been using for 99.(9)% of the time since whenever i found it. No offense, but the readme doesnt pass as a tutorial/documentation as it reads more like working notes. Maybe in some other situtation i would just man up and read the source code, but that seems like a disproportional time investment for a file listing program. And im not trying to coerce you into making it 100% approachable and user friendly. If this is a tool you hacked for your personal use, im still fine with whatever functionality i can comprehend myself. |
First - I am very glad to hear you use It's really an outgrowth of ideas in a 500-line Python thing I did back around y2k that was about 50% defined in environment variables Python could By "documentation" I meant the part of the help message I just "clarified", but it is true that I do not elaborate on "multi-level order/sorting", but I also added a comment in the config. Granted, that will not much help someone who just copies my config without understanding and never understands admittedly terse On the topic at hand, multi-level sorts are pretty common in databases (like SQL "order by") or even in the GNU sort command. The idea is that you have a key that is compared like a Nim Part of the complexity surely derives from that default The order system could all definitely use some elaboration beyond the comments in/example of the The inspiring use-case was "dot file directories" being in a block at the start, then "dot file non-dirs", then dirs, then non-dirs. This was more important to me in The README is tilted toward "What other stuff is missing" rather than "How to use One good starting point might be an expanded I'm also very open, if you want, to getting you up to speed enough to have your very own configs! And distributing them under |
exhibited in #5 I do doubt "User-DefinedFileKindOrder0" would be much less inscrutable than '0' for the uninitiated :-( Instead this needs real how-to-config documentation, also covering complexities of dual personality dirents.. aka "symbolic links" which definitely do not help. }
…ented" above in table of 1-letter codes *shared* as formatting codes), in further service of #5 (though that confusion was really caused by a classic "delimiter inside DSV" problem/eE "docs").
fair to assume that `lc` users also have ~/.config/cligen colors set up and it (maybe) makes the litany of sub-syntaxes/keywords thereof more digestible. Should probably embellish more of the per-option strings. (This is but one step on a road #5 discussion suggests.)
after observing configs more closely and playing around a bit, situation got a bit clearer, but there are still fundamental gaps i cant fully grasp, like dimensionality, and what constitutes dimensions and some other things. and small things like where in all example
i can see the point, but i dont believe in its practicality and i believe that its one of the big blocks in the barrier of entry. as it stands the help doesnt fit on one screen on my machine, so it isnt really a cheatsheet. and when i need to consult a help page, i either read it as it comes or grep it to find the relevant info. i get the abbreviations are almost part of your identity, but they obfuscate already compressed info to the point of noise. |
Well, I am working on formatting it less densely with highlighting, at least (..which I assume you have set up for cligen helps? @Vindaar and @kaushalmodi have both mentioned colorized help being one of the big cg draws). It may be hard to get it to "easy greppability", since that relies upon guessing "what will people grep for...". Really a "Guide To Configuring" is probably what is likely needed with various worked through examples. I may be able to just help2man the thing and begin a less dense actual man page. lc is pretty much Unix-only and man is the Unix idea for more thorough than --help docs. Detail is a tricky thing, of course - one wants just the right amount for a given audience, but audiences vary a lot. |
Re: the unclosed quotes - that was the only way I could get This is just a generic thing that would affect any cligen program. I don't recall ever submitting a Nim bug report about this, but you can if you like. If it works with newer Nim's I'd happily update those configs. If you hate it, you can actually just compile As I was editing that --help output, I was really reminding myself how good a cheat sheet it was for me writing my configs/etc. So, I think the answer is some more elaborate documentation (man page or markdown) to get other people to the point where that (or some future version of it) can be a cheat sheet for them doing similar. It is true that 5 or 6 of my 1-letter codes are not very related to their "thing" and a few others are just "user-defined", but the vast majority are just the 1st letter of their thing which is not particularly "worse" than GNU To expand on that, what I was thinking is using the same string as used for the "header row" could be the %code used in the formatting with a % and %{} if you need them back-to-back with no space. Almost all sorting codes are shared with formatting codes, and those could be the same, but we could just also accept a comma-separated list as the more verbose syntax and distinguish backward compatibly with the 1-letter variant by a leading comma or % in the new one, maybe. I'm not against any of this - I just did what was easiest first because no one complained (until now). It will need to expand the help cheat sheet. There may also be tension between "overwide columns from long header idents" (e.g. "%o" for occupancy of address space with data blocks - % not "holes", and also since that uses the meta-character There are things in this space that are already hyper abbreviated, though, like "i-node" which was originally for "index node", but if you called it "index node" many people would struggle until they realized "oh, he means i-node!". [abcm]time are kind of other examples where you might well have to read man pages to know which syscalls update which file times. I cannot do much about that stuff... { "vtime" is my own term, though..most would say max(c,m)-time instead of coining "version time", if I am even the first to do that.. Anyway, you can blame me for vtime and copying printf/strftime more than f-strings. }. |
of under-explained &| impenetrable help message discussion surrounding #5 . This really is incomplete. A short list of failures is: - Manual rather than automatic man-macro aligns in option sub-sections - almost everything should have some little example near it - abbreviation and time formats (at least!) are under-explained but something is better than nothing.
…t of #5 (comment) . This change is just about builtin file type/kind names. Since name match has always been by unique prefix, this can be ~100% back-compatible. (The only compatibility risk is users might have defined things with colliding same-prefixes like "regDir" which will now error out with ambiguity on use of "reg" rather than taking the exact match. This seems unlikely, but I mention it here to remember for release notes..). Specifically: reg -> regular bdev -> blockDevice cdev -> charDevice exec -> executable hard -> hardLinks (with 's' since, technically, n=1 is a hard link of sorts. So, think of it more as "has >1 hard links".) tmpD -> tmpDir worldW -> worldWritable unR -> unReadable odd -> oddPerm +-sym -> +-symlink (I still like +- here since people can never settle on "broken", "orphaned", "stale", etc.) CAP -> CAPABILITY Retained bdev & cdev as aliases since for those two only the new name is not prefixed by the old name. Retained some other things as not so bad. "suid" seems almost as standard an abbreviation as "symlink" (e.g. mount uses "nosuid" and `/tmp` is the prototypical "tmpDir" and almost all ACL tools just abbreviate "access control list", like `getfacl`). Also, change the type add template `tAdd` to wrap `t` in bool(). I left old abbreviations in the `lc --help` message since the whole style of the help is to be very brief (both here & just in general for --help).
sometimes the sorting order is subtly broken
episodes 16 and 20 for some reason are at the top
The text was updated successfully, but these errors were encountered: