-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
ask, choose, confirm: implement #99, #213, #188 #229
Open
balupton
wants to merge
19
commits into
master
Choose a base branch
from
dev-defaults
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,258
−3,056
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Still need to imlpement: - `--linger` - `--confirm-default=no` - `--confirm-input` ...and to make them consistent between ask, confirm, choose. This removes `--filter` from choose, as it is better facilitated by the new `--default(s)-fuzzy=` /close #188
changes: - bash.bash: - native __ prefix on methods, b/c alias (rather than non-performant inverse) - removed unused __print_lines_no_trail - ask, choose, confirm: - fix question title and body implementation, title is uniformly bold - linger answer will be dim - fix outdated linger option implementation - implement confirm on choose - implement linger on confirm - new options implemented in caller where appropriate - dorothy: remove require_globstar as already provided by bash.bash - get-flag-value: - remove unused complex --*-fallback options, fix inversions - update tests - macos-settings: remove fodder usage, was unnecessary todos: - need to update tests for ask, confirm, choose
…ults, which unfortunately was left behind on my mac mini when I did the rebase on my macbook # Conflicts: # commands/ask # commands/choose-menu # commands/confirm # commands/setup-git # commands/sparse-vault Also: - implement better timeout and error handling, no need for a delay anymore, and now commentary visible in linger - update callers accordingly, also update `dorothy` to remove unnecessary indentation, update `echo-lines` to remove typo in comment - add tests for the `echo-trim-colors` new handling of inline Still need to: - `choose`: - update tests for rewrite - fix duplicate `DEFAULTS` in choose (probably a long-standing regression) - support multiple default matches in `--no-multi` (as done by `echo-checksum`) by adding the concept of preferences - see details at #188 (comment) - add linger and timeout tests to `ask`, `choose`, `confirm`
- ask/choose/confirm: remove delay on errors - choose-path: fix help usage convention - read-key: rewrote hotkey handling for documented cross-os support, with support for more hotkeys - styles: documented terminal emulator support for all complex styles - choose: rewrite for page-up, page-down, home, end support, and do infrastructure for new confirm menu and paging indicators
this adds the infrastructure for a possible "cancel" menu mode
/close #231 Co-authored-by: Benjamin Lupton <[email protected]>
changes: - deprecated `echo-element` and `echo-segment`, as they are now supported by `echo-style` - `echo-style` and `styles.bash` updated for begin/end and color/nocolor styles - `echo-style` updated to do the minimal writes for performance and simplicity - `styles.bash` now has the `choose` styles, so `choose` theme can be customised by the user - `choose` fixed and styled no selection / no items /close #232 /ref #231 #188
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP — Work still ongoing for #188, and timeout tests need to be added for #99
/ref #99, #213, #188