From 8c372422b0f676a6dcae30a73ee0d4f50f94b318 Mon Sep 17 00:00:00 2001 From: syscl Date: Sun, 31 May 2026 01:04:32 -0700 Subject: [PATCH 1/3] 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 ``` From 7a85664c9752cc792885578aea3277af9b2ff25d Mon Sep 17 00:00:00 2001 From: syscl Date: Thu, 18 Jun 2026 16:34:17 -0700 Subject: [PATCH 2/3] Apply suggestion from @syscl --- src/content/docs/terminal/warpify/subshells.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/terminal/warpify/subshells.mdx b/src/content/docs/terminal/warpify/subshells.mdx index 0fb1d005..0489d6d0 100644 --- a/src/content/docs/terminal/warpify/subshells.mdx +++ b/src/content/docs/terminal/warpify/subshells.mdx @@ -56,7 +56,7 @@ if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; then fi # For bash subshells, add to ~/.bashrc or ~/.bash_profile. -if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; +if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; then printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "bash"}}\x9c' fi From da940ed03ce7420432dcdfda82efd41628b01cb1 Mon Sep 17 00:00:00 2001 From: syscl Date: Thu, 18 Jun 2026 16:36:11 -0700 Subject: [PATCH 3/3] Apply suggestion from @syscl --- src/content/docs/terminal/warpify/subshells.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/terminal/warpify/subshells.mdx b/src/content/docs/terminal/warpify/subshells.mdx index 0489d6d0..6adae045 100644 --- a/src/content/docs/terminal/warpify/subshells.mdx +++ b/src/content/docs/terminal/warpify/subshells.mdx @@ -61,7 +61,7 @@ if [[ "$TERM_PROGRAM" == "WarpTerminal" ]]; then fi # For fish subshells, add to ~/.config/fish/config.fish. -if status is-interactive and test "$TERM_PROGRAM" = "WarpTerminal" +if status is-interactive; and test "$TERM_PROGRAM" = "WarpTerminal" printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "fish"}}\x9c' end ```