From 04d07a50bf831928e28ec5157402370d67097110 Mon Sep 17 00:00:00 2001 From: OGATA Tetsuji Date: Thu, 9 Oct 2025 23:58:15 +0900 Subject: [PATCH] common_env: add shell integration support for kiro terminal --- common_env | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common_env b/common_env index 9c9f2b9..4b9c76f 100644 --- a/common_env +++ b/common_env @@ -188,6 +188,20 @@ if exists zoxide && exists shell_name ; then unset ZO_SHELL fi + +### +### kiro +### +# kiro: load shell integration when running inside kiro terminal +# Centralized here so both bash and zsh get the same behavior. +if [[ "$TERM_PROGRAM" == "kiro" ]] && exists kiro && exists shell_name ; then + # allow opt-out via env var: KIRO_DISABLE_SHELL_INTEGRATION=1 + if [ -z "${KIRO_DISABLE_SHELL_INTEGRATION:-}" ] ; then + kiro_path="$(kiro --locate-shell-integration-path "$(shell_name)")" + [[ -n "$kiro_path" && -f "$kiro_path" ]] && . "$kiro_path" + fi +fi + ### ### ssh-agent ###