Metadata-Version: 2.4
Name: getchwrap
Version: 2026.11.11.0
Summary: A subprocess wrapper to ergonomically eliminate redundant typing
Author-email: Ernesto Alfonso <erjoalgo@gmail.com>
Maintainer-email: Ernesto Alfonso <erjoalgo@gmail.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/erjoalgo/getchwrap
Project-URL: Documentation, https://github.com/erjoalgo/getchwrap
Project-URL: Repository, https://github.com/erjoalgo/getchwrap
Project-URL: Bug Tracker, https://github.com/erjoalgo/getchwrap/issues
Keywords: getchar,git,ergonomic
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX
Classifier: Topic :: Terminals
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pexpect
Dynamic: license-file

getchwrap runs an interactive command and, when you type one of the given
characters, presses Enter for you. It removes the extra keystroke from
programs that ask single-letter questions, such as `git add -p`.

With `--pattern`, it only does this after the program's output matches the
pattern, once per match, so the rest of your typing is unaffected.

To install:

`$ pip install getchwrap`

For example, answer `git commit -p`'s "Stage this hunk?" prompts with a single
key:

```
# answers that skip Enter, after a "Stage ...?" or "Discard ...?" prompt
alias __git-commit-getchwrap='VISUAL=vi getchwrap eynqsh?d -p "(Stage|Discard).+[?] " --'
alias gcp='__git-commit-getchwrap git commit -p'
```

getchwrap exits with the wrapped command's exit status, so `gcp && git push`
only pushes after a successful commit.

See `getchwrap -h` for the options.
