Skip to content

Prevent bash option reversion commands in bash completion function from being appended to bash history#859

Merged
natecook1000 merged 1 commit intoapple:mainfrom
rgoldberg:858-bash-shopt-no-history
Mar 20, 2026
Merged

Prevent bash option reversion commands in bash completion function from being appended to bash history#859
natecook1000 merged 1 commit intoapple:mainfrom
rgoldberg:858-bash-shopt-no-history

Conversation

@rgoldberg
Copy link
Copy Markdown
Contributor

Prevent bash option reversion commands in bash completion function from being appended to bash history.

Resolve #858

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@mredig
Copy link
Copy Markdown

mredig commented Jan 22, 2026

I don't understand bash as a language enough to comment on the code, but I can confirm issue #858 is resolved in this branch!

@rgoldberg
Copy link
Copy Markdown
Contributor Author

rgoldberg commented Jan 23, 2026

The cancellations don't seem to be related to the code changes in this PR.

@rgoldberg
Copy link
Copy Markdown
Contributor Author

Is there anything that I (or anyone else) must do to get the cancelled checks to run?

The PR's change just adds in scripting to replace newlines with semicolons in the shopt commands generated for the trap, so that they all run as one command line that is not added into the bash history, instead of separate command lines that are added to the history (presumably except for the first).

The change shouldn't have prevented the PR checks from running, so I assume the problem is in the check configuration.

@rgoldberg rgoldberg force-pushed the 858-bash-shopt-no-history branch 2 times, most recently from 99f8599 to e4be05a Compare March 19, 2026 16:10
…om being appended to bash history.

Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
@rgoldberg rgoldberg force-pushed the 858-bash-shopt-no-history branch from e4be05a to 34ba451 Compare March 20, 2026 12:28
@natecook1000 natecook1000 merged commit 157750e into apple:main Mar 20, 2026
69 of 70 checks passed
@rgoldberg rgoldberg deleted the 858-bash-shopt-no-history branch March 20, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completions Spamming History

3 participants