Skip to content

Commit 59a3d54

Browse files
Suppress history pollution when splash screen is sourced
Wraps the script body with set +o history / set -o history so function definitions don't leak into the user's shell history. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d166d06 commit 59a3d54

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/bodhi-splash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#
1010
# Suppress with: BODHI_NOSPLASH=1, or touch ~/.hushlogin
1111

12+
{ set +o history; } 2>/dev/null
13+
1214
__bodhi_splash_main() {
1315

1416
# -- Guards ----------------------------------------------------------
@@ -342,3 +344,5 @@ __bodhi_splash_main() {
342344

343345
__bodhi_splash_main "$@"
344346
unset -f __bodhi_splash_main
347+
348+
{ set -o history; } 2>/dev/null

0 commit comments

Comments
 (0)