Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions common_env
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,19 @@ if exists pnpm ; then
fi
fi

# Kiro terminal integration (conditional)
if [[ "$TERM_PROGRAM" == "kiro" ]] && exists kiro ; then
shell=$(shell_name)
if [ -n "$shell" ]; then
kiro_integration_path="$(kiro --locate-shell-integration-path "$shell" 2>/dev/null)"
if [ -n "$kiro_integration_path" ]; then
source_if_readable "$kiro_integration_path"
fi
unset kiro_integration_path
fi
Comment on lines +147 to +153
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional check for shell_name on line 147 is unnecessary. Unlike the zoxide and mise integrations (lines 196-215) that verify shell_name exists as a function with exists shell_name, the direnv integration (lines 128-134) directly uses shell_name without this check. Since shell_name is defined in path_functions which is sourced before common_env, and returns an empty string for unsupported shells, the inner check is redundant. If the empty string is a concern, it would be caught by the subsequent validation on line 149. Consider simplifying to match the direnv pattern or add the exists shell_name check in the outer condition to match zoxide/mise.

Suggested change
if [ -n "$shell" ]; then
kiro_integration_path="$(kiro --locate-shell-integration-path "$shell" 2>/dev/null)"
if [ -n "$kiro_integration_path" ]; then
source_if_readable "$kiro_integration_path"
fi
unset kiro_integration_path
fi
kiro_integration_path="$(kiro --locate-shell-integration-path "$shell" 2>/dev/null)"
if [ -n "$kiro_integration_path" ]; then
source_if_readable "$kiro_integration_path"
fi
unset kiro_integration_path

Copilot uses AI. Check for mistakes.
unset shell
fi

# Windsurf support (conditional)
# NOTE: Unlike other editors (code/cursor) that create symlinks in /usr/local/bin/,
# Windsurf requires adding its own bin directory to PATH for just one command.
Expand Down