Skip to content

Commit

Permalink
close #98: choose-(menu|option): support --default
Browse files Browse the repository at this point in the history
- dorothy:
    - a single menu prompt for shell selection, instead of a confirm for each shell
- choose-option:
    - support `--default=<item>` and `--defaults=<item>\n<item>`
    - use choose-menu hints when they make sense
    - don't output colours if we aren't meant to
- choose-menu:
    - support `--default=<item>` and `--defaults=<item>\n<item>`
    - unless `--no-hints` is provided, there will be will a hint line
    - selected items are now bold, to distinguish between current item (especially important for non-multi menus with default)
    - menu results are now visible when called standalone, as the tty clear/finish now happens before the stdout output
    - don't output colours if we aren't meant to
    - up and down actions now traverse the boundaries
    - if `--multi`, then `a` now selects all, and `d` now selects none
    - performance has improved, as we now just do a single tty output
- echo-style:
    - support `--color`, `--colors`, `--no-color`, `--no-colors`, and `--colors=yes|no` (`--color=...` and `--nocolor=...` are still stylised correctly)
  • Loading branch information
balupton committed Oct 24, 2023
1 parent 46b336b commit b564abb
Show file tree
Hide file tree
Showing 4 changed files with 438 additions and 189 deletions.
Loading

0 comments on commit b564abb

Please sign in to comment.