[Feature Idea] add way to see abbreviations and command descriptions more easily #7

Closed
opened 2020-05-15 11:10:06 +00:00 by vee · 2 comments
Contributor

Unless there is a way to find these that I haven't discovered, what I've been doing is going into code every time I want to see these.

I have three ideas, in case you like any!

  1. simply make help more verbose. It could be something like:
Documented commands (type help <topic>):
========================================
add       a       Add the current URL to the bookmarks menu.
cat               Run most recently visited item through "cat" command.
forward   fo      Go forward to the next gemini item.
previous  p,prev  Go to previous item before current in index.
  1. add a distinct verbose help command (or option to help), that prints the above.
  2. add a "command map" or "kb" sort of command that shows the abbreviations

I do realize the extra verbosity does add some new complexity, like what to do if the help text is really long! That's the case for add command, which I added to the above list, and tried out just adding its first line to the verbose output above, which I think could strike a nice balance.

What do you think?

Unless there is a way to find these that I haven't discovered, what I've been doing is going into code every time I want to see these. I have three ideas, in case you like any! 1. simply make help more verbose. It could be something like: ``` Documented commands (type help <topic>): ======================================== add a Add the current URL to the bookmarks menu. cat Run most recently visited item through "cat" command. forward fo Go forward to the next gemini item. previous p,prev Go to previous item before current in index. ``` 2. add a distinct verbose help command (or option to help), that prints the above. 3. add a "command map" or "kb" sort of command that shows the abbreviations I do realize the extra verbosity does add some new complexity, like what to do if the help text is really long! That's the case for `add` command, which I added to the above list, and tried out just adding its first line to the verbose output above, which I think could strike a nice balance. What do you think?
Owner

Hey, sorry for the slow response to this!

I like this idea in principle, but the output of help is generated automatically by the cmd module, it just looks at the docstring for each do_ method defined. As a result I have very limited control over how it is formatted and what is included.

Would a separate abbrevs command or something like that which produced something like the first two columns of your suggestion be of any use, or do you think people would miss that it was there? I guess if they tried help first they'd see it listed there...

Hey, sorry for the slow response to this! I like this idea in principle, but the output of `help` is generated automatically by the `cmd` module, it just looks at the docstring for each `do_` method defined. As a result I have very limited control over how it is formatted and what is included. Would a separate `abbrevs` command or something like that which produced something like the first two columns of your suggestion be of any use, or do you think people would miss that it was there? I guess if they tried `help` first they'd see it listed there...
Author
Contributor

No worries! Ah, I see. I wasn't aware Python shipped with all of that built-in! Neat.

abbrevs sounds like a very workable solution, and way less work than monkey-patching all of the built-in help-printing code! I can even donate that, if you're open to it! !13

No worries! Ah, I see. I wasn't aware Python shipped with all of that built-in! Neat. `abbrevs` sounds like a very workable solution, and way less work than monkey-patching all of the built-in help-printing code! I can even donate that, if you're open to it! !13
vee closed this issue 2020-05-28 12:21:30 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: solderpunk/AV-98#7
No description provided.