Closed fictionic closed 6 years ago
In retrospect, the commandline usability of demlo suffers from debatable design decisions. Your suggestion only tackles the tip of iceberg...
10-tag
is run before 60-path
, which is almost always what we want.I think there originally were a few reason as for why -s
does not accept regexp; however, with latest versions none of them seems to be valid anymore.
Completion does not work on -r
though, I think it's an oversight. I should fix that too.
Other points unrelated to your request, but I'm curious if you'd have any comment on this.
I think each script should come with an individual help which would provide a description, a list of the global variables in use if any, and some examples. I believe that would make Demlo dramatically more user friendly.
Sensible defaults: right now, the included demlorc
is not parsed in the system folder. I think Demlo should parse it so that a config-less Demlo does something meaningful by default instead of doing nothing. It would still be possible revert to the current behaviour by either uninstalling the system demlorc
or by creating and empty user demlorc
.
(2) I've dumped zsh a long time ago... Too much insanity there for me, sorry :p I'll welcome any contribution however, obviously.
(4) You meant demlorc
, right? Then that's correct.
(2) Yeah it's hella complicated for sure. I'll look into it at some point.
(3) Yep
I'd also love any feedback you have on my demloconf repo that I linked above; I've worked on it a whole lot!
Fixed in 285f069975bbb238b7403a316a7580fef4446296.
@fictionic Let me know if that works for you.
The indeces of the scripts are an implementation detail that the user should not need to worry about. The user only cares about the functionality of the included script, which is indicated in the main part of the name. E.g.
-s cover
vs-s 70-cover
.Another, more drastic idea would be to make
-s
work exactly like-r
—that is, make it include all scripts whose name match the provided regex. This is desirable for the same reason as it is for-r
. Suppose you have two scripts that deal with file tags (as I do):10-tag-fields
and11-tag-contents
. If you want to run only those scripts, you'd need to do-r '' -s 10-tag-fields -s 11-tag-contents
. With the regex strategy, this becomes-r '' -s tag
. This also occurs when the scripts you want to include are not run by default.What do you think?