-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
: comprehensive support of TTY modes and capabilities
#254
Commits on Oct 1, 2024
-
choose, echo-wrap, read-key: support no-TTY
This adds support for no-TTY, such as a CI environment, or via `ssh -T ...` to `choose`. However, this rewrites `read-key` to support such, and there needs further work as it still sends multiple characters in a single line under certain circumstances. However, `read-key` now does support no-TTY situations, such as pipes, or bash v3 character mashing. The complexity with this, is that there is no way native to just read one key at a time, and escape sequences can take multiple characters, as such the approach taken is to trim known escape sequences and then split the remaining. This is fine, however it means read-key now only supports known characters, and as such is more adequate to be considered a read-keyboard-key or so, as special escape sequences will require a lot of complexity to support, as they will need say our regex handling in `echo-wrap.awk` to be trimmed. This all means that `read-key` should be changed instead of reading one key at a time, now in an aggregate, it should just read everything and then shift the keys off.
Configuration menu - View commit details
-
Copy full SHA for 7f91040 - Browse repository at this point
Copy the full SHA 7f91040View commit details
Commits on Oct 5, 2024
-
WIP: choose, confirm, read-key: improve no-TTY support
- `read-key` and `confirm` have been rewritten
Configuration menu - View commit details
-
Copy full SHA for 2c1b508 - Browse repository at this point
Copy the full SHA 2c1b508View commit details
Commits on Oct 9, 2024
-
bash.bash: add common helpers for performance
- `bash.bash`: add `__command_(missing|exists)`, `__try_sudo`, `__is_brew`, `__mkdirp`, `__sudo_mkdirp`, and `__can_read_decimal_timeout` - `(command-(exists|missing)|is-brew)`: use the `bash.bash` functions - `(command-(exists|missing|working)|is-brew)`: add tests - `debug-network:` fix bad maintenance over the years - `dorothy`: - move common helpers into `bash.bash`, and improve them - source the `bash.bash` that is appropriately local or remote - `(echo-(html|url)-coder|fs-dequarantine|get-desktop-theme|setup-util-(1password-cli|apple-(cli-tools|rosetta)|yt-dlp))`: fix functional incorrect function names - `expand-path-zsh` renamed to `expand-path.zsh` to follow modern conventions - `get-font`: improve performance - `is-tty`: remove unneeded `echo`s for modern conventions in tests - `setup-util`: conjoined a few redundant calls - `echo-mkdirp`: moved to beta commands as it is no longer used internally
Configuration menu - View commit details
-
Copy full SHA for c7f31b1 - Browse repository at this point
Copy the full SHA c7f31b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba73e79 - Browse repository at this point
Copy the full SHA ba73e79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2582cdf - Browse repository at this point
Copy the full SHA 2582cdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1dbdd43 - Browse repository at this point
Copy the full SHA 1dbdd43View commit details
Commits on Oct 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2fc7757 - Browse repository at this point
Copy the full SHA 2fc7757View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47f29cb - Browse repository at this point
Copy the full SHA 47f29cbView commit details -
dorothy: rejig clone and update to all support slug/branch/reference/…
…remote-name also remove update technique for legacy dorothy installations
Configuration menu - View commit details
-
Copy full SHA for b60ef24 - Browse repository at this point
Copy the full SHA b60ef24View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee11038 - Browse repository at this point
Copy the full SHA ee11038View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b9d99c - Browse repository at this point
Copy the full SHA 7b9d99cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c48e182 - Browse repository at this point
Copy the full SHA c48e182View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4098286 - Browse repository at this point
Copy the full SHA 4098286View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a3236c - Browse repository at this point
Copy the full SHA 7a3236cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4193b8e - Browse repository at this point
Copy the full SHA 4193b8eView commit details -
bash.bash: add
has_needles
helper for performancerewrite `is-needle` to use this new `has_needles` helper and add tests
Configuration menu - View commit details
-
Copy full SHA for 64c9cf6 - Browse repository at this point
Copy the full SHA 64c9cf6View commit details
Commits on Oct 11, 2024
-
choose: auto-select solo required item for git-helper use case
git-helper: - add verify step - improve the way remotes are gathered - fix path not sent to review - support update on repos that don't have origin, and restore remote prompt on repos with multiple remotes /ref b60ef24 /ref https://github.com/bevry/dorothy/actions/runs/11267661909/job/31333162360#step:3:1812 /ref https://github.com/bevry/dorothy/actions/runs/11115550380/job/30884206594#step:3:1873 /ref https://github.com/bevry/dorothy/actions/runs/11277567607/job/31364020536#step:3:1873 /ref https://github.com/bevry/dorothy/actions/runs/11286493561/job/31390927875#step:3:2128 /ref https://github.com/bevry/dorothy/actions/runs/11286573839/job/31391154425#step:3:1896 /ref https://github.com/bevry/dorothy/actions/runs/11286652092/job/31391365190#step:3:2141 /ref https://github.com/bevry/dorothy/actions/runs/11287510416/job/31393567790#step:3:1797 /ref https://github.com/bevry/dorothy/actions/runs/11287614318/job/31393844817#step:3:1798 /ref https://github.com/bevry/dorothy/actions/runs/11287762099/job/31394250547#step:3:1861
Configuration menu - View commit details
-
Copy full SHA for 6b7f98a - Browse repository at this point
Copy the full SHA 6b7f98aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e15cab8 - Browse repository at this point
Copy the full SHA e15cab8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a4583b - Browse repository at this point
Copy the full SHA 8a4583bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c71c557 - Browse repository at this point
Copy the full SHA c71c557View commit details
Commits on Oct 15, 2024
-
WIP: removed
tty.bash
forget-terminal-*
commandstodos: - `ask` no-tty support - documentation of fixes, new features, changes, deprecations
Configuration menu - View commit details
-
Copy full SHA for 5def66e - Browse repository at this point
Copy the full SHA 5def66eView commit details -
Configuration menu - View commit details
-
Copy full SHA for acee8c9 - Browse repository at this point
Copy the full SHA acee8c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06a2cae - Browse repository at this point
Copy the full SHA 06a2caeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 369ff92 - Browse repository at this point
Copy the full SHA 369ff92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 99ac325 - Browse repository at this point
Copy the full SHA 99ac325View commit details -
dorothy, fs-realpath: detect when alpine uses busybox or coreutils an…
…d react accordingly /ref https://github.com/bevry/dorothy/actions/runs/11337845512/job/31530095505#step:4:56
Configuration menu - View commit details
-
Copy full SHA for a9a57f5 - Browse repository at this point
Copy the full SHA a9a57f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41de4c2 - Browse repository at this point
Copy the full SHA 41de4c2View commit details -
echo-file: fix bat usage, all: improve styling
styles.bash: add some escaped styles, such as `newline` echo-style: support '--=...', '--=', '--' arguments change `echo` to `__print_lines` compress multiple `echo-style` calls into one fix broken `code_notice` style and replace to `code-notice1` implement new styles where appropriate, however this is not comprehensive at all use `echo-style --tty` instead of `echo-style >/dev/tty` as the former can support when `/dev/tty` doesn't exist
Configuration menu - View commit details
-
Copy full SHA for fc24131 - Browse repository at this point
Copy the full SHA fc24131View commit details -
Configuration menu - View commit details
-
Copy full SHA for f62bebd - Browse repository at this point
Copy the full SHA f62bebdView commit details -
choose: - don't crash on unknown keys, instead flash bell - improve performance of legend rendering - don't hide/show cursor on environments that don't support it read-key: - don't output unknown keys by default - support `shift+(left|right)` on macos - fix tests for `is-tty` deprecation get-terminal-color-support: - if ci that isn't github, continue to fail, however if dumb terminal and not ci, continue to fallback - this enables fallback on `ssh -T ...`, which does support colors get-terminal-quiet-support: - adapt for the `get-terminal-color-support` convention, however keep same functionality, this could be a mistake - will need to evaluate get-terminal-title-support: - vscode doesn't support titles, so fail on vscode video-merge: - use `is-headful` which is appropriate, instead of the deprecated `is-tty` styles.bash: - use support vars at the begining for clarity and performance oz: - cleanup a little bit, now that docs are elsewhere todos: - check if `--quiet=''` causes crashes
Configuration menu - View commit details
-
Copy full SHA for 5405c39 - Browse repository at this point
Copy the full SHA 5405c39View commit details
Commits on Oct 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b4ef3c8 - Browse repository at this point
Copy the full SHA b4ef3c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 383e36a - Browse repository at this point
Copy the full SHA 383e36aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 648843c - Browse repository at this point
Copy the full SHA 648843cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 598918e - Browse repository at this point
Copy the full SHA 598918eView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc483c3 - Browse repository at this point
Copy the full SHA cc483c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 888b090 - Browse repository at this point
Copy the full SHA 888b090View commit details
Commits on Oct 23, 2024
-
add
dorothy-warnings
, a deprecation systemre-add some WIP deleted commands to `commands.deprecated` and move some longstanding deprecated commands into it, also remove duplicate `is-match` from 7ee7f6c deprecate `echo-clear-line` until-success: things that should be output to the terminal device file are now outputted there move ansi escape code documentation from various commands into a new `ansi-escape-codes.md` documentation file update the outdated `prompts.md` documentation file
Configuration menu - View commit details
-
Copy full SHA for d99a9a6 - Browse repository at this point
Copy the full SHA d99a9a6View commit details -
consistentcy for commands.deprecated
second part of 4ee1fa4 to maintain renames
Configuration menu - View commit details
-
Copy full SHA for a37639d - Browse repository at this point
Copy the full SHA a37639dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a3ba02f - Browse repository at this point
Copy the full SHA a3ba02fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8a0640 - Browse repository at this point
Copy the full SHA e8a0640View commit details -
echo-clear-lines: prep for improvements
also revert broken WIP echo-clear-lines argument usage, with correct `< <(...)` usage
Configuration menu - View commit details
-
Copy full SHA for 713322d - Browse repository at this point
Copy the full SHA 713322dView commit details -
improvements to clearing, and resolve setup-util(-bash) edge case
- brew-installed: support --quiet argument, return exit status 46 if brew is not installed - echo-quote: support --double and --single arguments - echo-revolving-door: remove some outdated implementation comments - fs-rm: note when trash is not available - setup-util: - output to /dev/tty if supported and appropriate - if uninstalling/upgrading the currently executing bash, output a warning - redo the clearing functionality to implement modern conventions and support a wide range of edge cases, such as when installer outputs more than LINES, or when clear is not available, or when the installer needs interaction - don't remove non-xdg-bins when upgrading as that causes issues with homebrew if the homebrew-intalled bin was removed but homebrew still thinks it is installed - setup-util-bash: detections and workarounds if trying to uninstall/upgrade the currently executing bash - add an `echo-revolving-screen` command that unfortunately doesn't work properly and I don't know why - styles.bash: change clear screen to use `\e[J` instead of `\e[2J` for reasoning documented inside the file
Configuration menu - View commit details
-
Copy full SHA for 8324b75 - Browse repository at this point
Copy the full SHA 8324b75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52958a2 - Browse repository at this point
Copy the full SHA 52958a2View commit details -
ask/choose/confirm: complete no-TTY support
/close #253 - shellcheckrc: add `SC2059`, and add docs on all the disabled rules - ask: rewrote for modern conventions, support no-TTY, fix read failures not being output - ask/choose/confirm: consistent commentary styling - choose: fix blockquote line being a different color or breaking colors - confirm: fix and improve the WIP no-TTY support, now complete - dorothy: prompt for lint upgrade before dev deps, to speed up UX - echo-clear-lines: rewrote to support all known edge cases - echo-count-lines: add note that it doesn't wrap - echo-escape-command: use new `__quote` helped in `bash.bash` to support ANSI Escape Codes - echo-quote: add tests, add support for `--single` and `--double` arguments - echo-regexp(.ts)?: better support for character classes, supporting `[[:XXX:]]` and `[:XXX:]` forms - echo-revolving-door: rewrote to support all known edge cases - added `echo-substr`: as command alias for `__substr` helper in `bash.bash` - echo-wrap: fix help errors not showing, support --column=* alias for --width=* - eval-helper: updated for TTY changes, aand fix all known edge cases - expand-path.zsh: same functionality, but rewrote for clarity - setup-util: linting, and only output the output if there is output - setup-util-bash: compact `echo-style` calls for performance, include `setup-util --check` for performance - until-success: rewrote for new TTY conventions - echo-escape-special: fix everything being dumped together - is-shapeshifter: rewrote and add tests, to fix all known edge cases, and now uses `bash.bash` helpers - bash.bash: - remove deprecated usage of `__print_line ...` use `__print_lines ...` instead - support initial `--` argument in appropriate functions - rewrite to use [[ ... ]] instead of test/[ to better handle edge cases - stdinargs.bash: - rewrite to use [[ ... ]] instead of test/[ to better handle edge cases, such as a trailing line containing only `>` - zsh.zsh: - consistency with `bash.bash` changes - rewrote and fixed `__substr` helper for edge cases - added `is_shapeshifter` and `__escape_shapeshifting` helpers, used in `is-shapeshifter` - ansi-escape-codes.md: removed excess docs todos: - decide if ask/choose/confirm linger should be outputted to stderr if there is commentary and a sucess code but no linger, check if consistent with choose - setup-util: consider new wrapper for the font selection too
Configuration menu - View commit details
-
Copy full SHA for 099bb6b - Browse repository at this point
Copy the full SHA 099bb6bView commit details
Commits on Oct 24, 2024
-
ask/choose/confirm: fix broken tests, although
ask
test has a clear……ing issue when testing get-terminal-position-support: fix crash when stdin not accessible get-terminal-tty-support: expand debug information to look for ways to ensure ask is only clearing input if it needed to is-interactive: simplify conditional logic read-key, is-shapeshifter: add (ctrl|alt)+(left|right) macos keys dorothy, dorothy-warnings: only output warnings by default if there are new warnings
Configuration menu - View commit details
-
Copy full SHA for 0dfebda - Browse repository at this point
Copy the full SHA 0dfebdaView commit details
Commits on Oct 25, 2024
-
improvements to TTY and STDIN reporting
- add `debug-terminal-(stdin|tty)` - simplify `get-terminal-*-support` checks - `IFS=''` to `IFS=` as they are equivalent - get-terminal-theme: add `--ignore-cache` option - echo-file: correctly handle bat theme in cases where theme could not be detected, such as inside `ssh -T`
Configuration menu - View commit details
-
Copy full SHA for 613cec8 - Browse repository at this point
Copy the full SHA 613cec8View commit details -
ask: rewrote for new stdin/tty learnings, properly support no-TTY
ask: - if non-reactive, use alternative screen buffer - add `--no-inline` option to force usage of alternative screen buffer if supported/reactive - this solves the impossibility of clearing the accurate amount of lines in no-TTY mode, as `ssh -T` and pipe/redirect/CI result in different line counts due to `ssh -T` outputting the enter key as a visual new line dorothy, setup-util-bash, setup-util-gh: use new `get-terminal-reactivity-support` command, and deprecate `is-interactive` add a `terminals-and-tty.md` document with the learnings and reasoning dorothy-warnings: prevent clearing of warnings causing warnings to be shown
Configuration menu - View commit details
-
Copy full SHA for d605711 - Browse repository at this point
Copy the full SHA d605711View commit details -
use the correct quote/escape for the context
/ref https://github.com/bevry/dorothy/actions/runs/11512899768 also fix `echo-regexp` including `stdinargs.bash` when it didn't need to
Configuration menu - View commit details
-
Copy full SHA for d2b29cb - Browse repository at this point
Copy the full SHA d2b29cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36e8c75 - Browse repository at this point
Copy the full SHA 36e8c75View commit details
Commits on Oct 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1c7b588 - Browse repository at this point
Copy the full SHA 1c7b588View commit details -
re-add
--needle=
prefix on needle option onis-needle
calls, to p……revent edge case failures when the needle looks like an option
Configuration menu - View commit details
-
Copy full SHA for 4f66b71 - Browse repository at this point
Copy the full SHA 4f66b71View commit details