Conversation
There was a problem hiding this comment.
Pull request overview
Release prep for HSTR v3.2.0, including runtime behavior changes around TIOCSTI enforcement/configuration, terminal cleanup improvements, and release/documentation/packaging updates.
Changes:
- Add TIOCSTI-related configuration warning flow (with interactive prompt + suppression env var) and update shell integration snippets to use
hstr -- .... - Handle SIGQUIT similarly to SIGINT for terminal cleanup; increase command-line buffer size to address overflow on resize.
- Update docs, changelog/release metadata, CI workflow dependencies, and various packaging/build scripts.
Reviewed changes
Copilot reviewed 76 out of 78 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/test-utf8.sh | Copyright year bump for release. |
| test/test-keyb.sh | Copyright year bump for release. |
| test/test-history-generator.sh | Copyright year bump for release. |
| test/test-curses-keyb.sh | Copyright year bump for release. |
| test/test-bug-228.sh | Copyright year bump for release. |
| test/test-bug-176.sh | Copyright year bump for release. |
| test/test-bug-175.sh | Copyright year bump for release. |
| test/test-bug-163.sh | Copyright year bump for release. |
| test/test-bug-124.sh | Copyright year bump for release. |
| test/src/test_utf8.c | Copyright year bump for release. |
| test/src/test_keyb.c | Copyright year bump for release. |
| test/src/test_history_generator.c | Copyright year bump for release. |
| test/src/test_curses_keyb.c | Copyright year bump for release. |
| test/src/test.c | Copyright year bump for release. |
| test/hstr-unit-tests.pro | Copyright year bump for release. |
| src/radixsort.c | Copyright year bump for release. |
| src/main.c | Copyright year bump for release. |
| src/include/radixsort.h | Copyright year bump for release. |
| src/include/hstr_utils.h | Copyright year bump for release (also contains TIOCSTI behavior notes referenced by new logic). |
| src/include/hstr_regexp.h | Copyright year bump for release. |
| src/include/hstr_history.h | Copyright year bump for release. |
| src/include/hstr_favorites.h | Copyright year bump for release. |
| src/include/hstr_curses.h | Copyright year bump for release. |
| src/include/hstr_blacklist.h | Copyright year bump for release. |
| src/include/hstr.h | Add system includes needed by new select/isatty-based warning logic; copyright year bump. |
| src/include/hashset.h | Copyright year bump for release. |
| src/hstr_utils.c | Copyright year bump for release. |
| src/hstr_regexp.c | Copyright year bump for release. |
| src/hstr_history.c | Copyright year bump for release. |
| src/hstr_favorites.c | Copyright year bump for release. |
| src/hstr_curses.c | Copyright year bump for release. |
| src/hstr_blacklist.c | Copyright year bump for release. |
| src/hstr.c | v3.2.0 version string, larger cmdline buffer, SIGQUIT handling, TIOCSTI config warning flow, shell snippet updates. |
| src/hashset.c | Copyright year bump for release. |
| src/Makefile.am | Copyright header range update. |
| snap/snapcraft.yaml | Copyright year bump for release. |
| pad.xml | Update version/date/URLs/file size metadata for release. |
| man/hstr.1 | Formatting cleanup + update no-TIOCSTI bash/zsh snippets to use hstr -- .... |
| hstr.pro | Copyright year bump for release. |
| etc/bash-completion.d/hstr | Fix incorrect completion option (--show-zsd-configuration -> --show-zsh-configuration) and add bash-specific option. |
| doc/USER-DOCUMENTATION.md | Cleanup + replace hh examples with hstr for consistency. |
| configure.ac | Copyright year bump for release. |
| build/ubuntu/pbuilder-refresh-all-distros.sh | Copyright year bump for release. |
| build/ubuntu/pbuilder-add-new-distro.sh | Copyright year bump for release. |
| build/ubuntu/launchpad-make-all-releases.sh | Update launchpad release variables for 3.2 series. |
| build/ubuntu/launchpad-add-hstr-ppa.sh | Copyright year bump for release. |
| build/ubuntu/debian/copyright | Update year for packaging metadata. |
| build/travis-ci/.travis.yml | Copyright year bump for release. |
| build/test-units.sh | Copyright year bump for release. |
| build/test-set-env-utf8-history.sh | Copyright year bump for release. |
| build/test-set-env-monster-history.sh | Copyright year bump for release. |
| build/test-memleaks.sh | Adjust default scenarios/HISTFILE and valgrind invocation. |
| build/test-generate-unity-test-runner.sh | Copyright year bump for release. |
| build/test-gdb.sh | Copyright year bump for release. |
| build/test-clean.sh | Copyright year bump for release. |
| build/tarball/tarball-uninstall.sh | Copyright year bump for release. |
| build/tarball/tarball-build.sh | Update tarball version to 3.2.0. |
| build/tarball/tarball-automake.sh | Copyright year bump for release. |
| build/fedora/rpm-from-deb.sh | Copyright year bump for release. |
| build/debian/upload-to-mentors.sh | Copyright year bump for release. |
| build/debian/make-deb.sh | Update Debian packaging version strings to 3.2.0. |
| build/debian/debian/copyright | Update year for packaging metadata. |
| build/debian/aptly-add-deb.sh | Copyright year bump for release. |
| build/arch/update-pkgconfig-sha256-on-repo-change.sh | Copyright year bump for release. |
| build/anigif-rename.sh | Copyright year bump for release. |
| build/anigif-create.sh | Copyright year bump for release. |
| build/anigif-build.sh | Copyright year bump for release. |
| build/Makefile | Add a developer convenience Makefile for build/test/install workflows. |
| TIPS.md | New tips/tricks doc referenced from README. |
| SECURITY.md | Mark 3.2.0 as supported. |
| README.md | Add packages section and tips/troubleshooting links; reformat “In the News”. |
| PKGBUILD | Update Arch package version to 3.2 series. |
| INSTALLATION.md | Clarify importance of configuration for command insertion; link to issue. |
| Changelog | Add v3.2.0 entry and reformat older entries. |
| .gitignore | Ignore additional autotools artifacts and generated Makefiles. |
| .github/workflows/build_ubuntu.yml | Update runner and apt package list for newer Ubuntu. |
| .github/copilot-instructions.md | Add repo-specific Copilot guidance document. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| char *tiocsti_env = getenv(HSTR_ENV_VAR_TIOCSTI); | ||
| char *suppress_warning = getenv(HSTR_ENV_VAR_SUPPRESS_WARNING); | ||
|
|
||
| // IF env var is not set, or is set to anything other than "n", | ||
| // THEN show warning unless suppression flag is set | ||
| if ((!tiocsti_env || strcmp(tiocsti_env, "n") != 0) && !suppress_warning) { | ||
| bool skip_check = false; |
There was a problem hiding this comment.
The suppression check uses only presence of HSTR_SUPPRESS_TIOCSTI_WARNING (non-NULL) to suppress the warning. This also suppresses when the variable is set to "0"/empty. Consider checking its value (e.g., == "1"/"true") so users can explicitly disable suppression.
| "HSTR cannot inject commands into your shell because:\n" | ||
| " - Your Linux kernel >= 6.2.0 has TIOCSTI disabled\n" | ||
| " - Your %s config is missing required HSTR function\n" | ||
| "To fix this, run:\n" |
There was a problem hiding this comment.
The warning text hard-codes "Your Linux kernel >= 6.2.0 has TIOCSTI disabled", but is_tiocsti_supported() returns false for non-Linux targets like MS_WSL/CYGWIN as well. Please adjust the message to accurately reflect the detected condition (e.g., "TIOCSTI is not available"), otherwise users on those platforms will see a misleading diagnosis.
| function hstrnotiocsti { | ||
| { HSTR_OUT="$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )"; } 3>&1; | ||
| READLINE_LINE="$(hstr ${READLINE_LINE})" | ||
| { READLINE_LINE=\"$( { </dev/tty hstr -- ${READLINE_LINE}; } 2>&1 1>&3 3>&- )\"; } 3>&1; | ||
| READLINE_POINT=${#READLINE_LINE} |
There was a problem hiding this comment.
In the Bash configuration snippet, the added backslashes around quotes (e.g., READLINE_LINE="$(...)") will appear literally in the rendered man page and can break copy/paste. Since this block is under .nf, the line should use normal shell quoting without the extra escapes.
🤖 Augment PR SummarySummary: This PR prepares the HSTR 3.2.0 release, focusing on better behavior and guidance when Changes:
Technical Notes: The release targets kernels where 🤖 Was this summary useful? React with 👍 or 👎 |
| bool show_tiocsti_configuration_warning(void) | ||
| { | ||
| // If stdin or stderr is not a TTY, don't prompt interactively to avoid invisible hangs | ||
| if (!isatty(STDIN_FILENO) || !isatty(STDERR_FILENO)) { |
There was a problem hiding this comment.
show_tiocsti_configuration_warning() returns false when STDERR isn’t a TTY, and the caller treats that as “exit and configure” (exits with HSTR_EXIT_CONFIG_REQUIRED). This can cause unexpected termination when users run with redirected stderr (e.g., exec 2>...); consider skipping the warning/exit path in that case instead of forcing exit.
Other Locations
src/hstr.c:1894
🤖 Was this useful? React with 👍 or 👎
This PR brings new HSTR release.