Skip to content

[Release] HSTR 3.2.0#557

Merged
dvorka merged 32 commits intomasterfrom
dev-3.2.0
Feb 6, 2026
Merged

[Release] HSTR 3.2.0#557
dvorka merged 32 commits intomasterfrom
dev-3.2.0

Conversation

@dvorka
Copy link
Owner

@dvorka dvorka commented Jan 28, 2026

This PR brings new HSTR release.

2026-02-06  Martin Dvorak  <martin.dvorak@mindforger.com>

  * Released v3.2.0 - Minor release bringing:
    - Configuration for TIOCSTI enforcement
    - Added SIGQUIT handling to cleanup terminal state on quit
    - Fixed buffer overflow (window resize) and missing Bash autocomplete configuration
    - Fixed undesired encapsulation of patterns with quotes in case they contain spaces
    - Updated changelog layout

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1862 to +1868
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;
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +298 to +301
"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"
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 201 to 203
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}
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@augmentcode
Copy link

augmentcode bot commented Jan 28, 2026

🤖 Augment PR Summary

Summary: This PR prepares the HSTR 3.2.0 release, focusing on better behavior and guidance when TIOCSTI is unavailable and on improving documentation/packaging.

Changes:

  • Bumped version/release metadata to 3.2.0 across project files (Changelog, PKGBUILD, pad.xml, Debian/Ubuntu scripts).
  • Added a configuration-required warning/exit flow when TIOCSTI is disabled and shell integration isn’t configured; introduced HSTR_TIOCSTI and HSTR_SUPPRESS_TIOCSTI_WARNING.
  • Handled SIGQUIT in addition to SIGINT to help restore terminal state on quit.
  • Increased internal command-line buffer sizing and refreshed bash/zsh config snippets and bash-completion option names.
  • Updated GitHub Actions CI to run on ubuntu-latest and adjusted package dependencies for Ubuntu 24.04.
  • Improved user-facing docs (INSTALLATION/README, new TIPS.md) and added developer build helpers (build/Makefile) plus Valgrind test script refinements.

Technical Notes: The release targets kernels where TIOCSTI is restricted by default, encouraging users to add the appropriate shell function so HSTR can insert selected commands into the prompt.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

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)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@dvorka dvorka merged commit a7635ce into master Feb 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants