From 8c372422b0f676a6dcae30a73ee0d4f50f94b318 Mon Sep 17 00:00:00 2001 From: syscl Date: Sun, 31 May 2026 01:04:32 -0700 Subject: [PATCH] Only warpify on WarpTerminal Without this change, on default terminal apps (e.g. macOS's terminal) it will show an urgly line per terminal process ``` Last login: Sun May 31 01:02:11 on ttys005 $f{"hook": "SourcedRcFileForWarp", "value": { "shell": "zsh"}}?% ``` The condition make the apply cleaner, test locally and works --- src/content/docs/terminal/warpify/subshells.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/content/docs/terminal/warpify/subshells.mdx b/src/content/docs/terminal/warpify/subshells.mdx index 3260eded..0fb1d005 100644 --- a/src/content/docs/terminal/warpify/subshells.mdx +++ b/src/content/docs/terminal/warpify/subshells.mdx @@ -51,13 +51,17 @@ To remember your preferences for a command and bypass the confirmation banner, y ```bash # For zsh subshells, add to ~/.zshrc. -printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "zsh"}}\x9c' +if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; then + printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "zsh"}}\x9c' +fi # For bash subshells, add to ~/.bashrc or ~/.bash_profile. -printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "bash"}}\x9c' +if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; + printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "bash"}}\x9c' +fi # For fish subshells, add to ~/.config/fish/config.fish. -if status is-interactive +if status is-interactive and test "$TERM_PROGRAM" = "WarpTerminal" printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "fish"}}\x9c' end ```