Skip to content
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

options to pack numbers and names overlapping with names on top #8

Open
secretGeek opened this issue May 29, 2020 · 1 comment
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@secretGeek
Copy link
Owner

secretGeek commented May 29, 2020

names and numbers are written in different colors with different brightness and at different layers so that names go in front of numbers.

and because:

  1. numbers are predictable and
  2. names are generally sufficiently inconsistent in their lengths and longer at their maximum than numbers:

the two can be overlapped by left aligning one and right aligning the other.

(See example in next comment)

@secretGeek secretGeek added enhancement New feature or request help wanted Extra attention is needed labels May 29, 2020
@secretGeek
Copy link
Owner Author

Here is an example to illustrate the idea.

Consider this current output for a (fictional) .ok file:

currently

Note:

  • there are some named and some un-named commands. (this is quite normal)
  • All commands can be called with numbers. (this is how ok works and i'm not proposing changing this)
  • Numbers are only shown for un-named commands. (the proposal will sometimes change this)
  • The names are right aligned, and there is some natural variation in their lengths (this is quite normal).
  • The numbers are also right aligned

Here is an example of the proposed new output:

proposed

Note:

  • the numbers of the named commands are still shown (provided there is space to show them)
  • (the final line can still be called with ok 7 but the number is not shown, because the command name is long enough that it is "hidden")
  • the numbers are left-aligned

Something clear from this example:

  • if the length of the command is equal to the maximum length, then the number is not shown.

Something that is not clear from this example:

  • if another command had a name that was only one character shorter... would the number be shown (it would abut the command name: there would be no space between them.) -- i think in that case the number would not be shown.

i think the rule is:

The number is only shown if there is room to write the number, followed by a single space... without overlapping the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant