Просмотр исходного кода

Merge pull request #4926 from YuriNachos/fix/zsh-history-expansion-807

fix: disable zsh history expansion to prevent commands with ! from failing (#807)
Kevin van Dijk 1 неделя назад
Родитель
Сommit
65a946d3e6

+ 5 - 0
.changeset/fix-disable-zsh-history-expansion.md

@@ -0,0 +1,5 @@
+---
+"kilo-code": patch
+---
+
+fix: disable zsh history expansion (#4926)

+ 4 - 0
src/integrations/terminal/ShellIntegrationManager.ts

@@ -36,6 +36,10 @@ export class ShellIntegrationManager {
 
 				const zshrcContent = `
 	source "${shellIntegrationPath}"
+	# Disable history expansion (!) to prevent commands with ! from failing
+	# Fixes issue where commands like --collectCoverageFrom="!pattern" would fail
+	# with "event not found" error
+	setopt NO_BANG_HIST
 	ZDOTDIR=\${ROO_ZDOTDIR:-$HOME}
 	unset ROO_ZDOTDIR
 	[ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv"