Skip to content

Commit bf44702

Browse files
committed
Bash: Cursor shell integration
1 parent d6a4673 commit bf44702

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function is_cursor_agent() {
2+
[[ -n $VSCODE_PID ]] && [[ -n $CURSOR_AGENT ]]
3+
}
4+
5+
function is_ai_agent() {
6+
is_cursor_agent
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
__SHELL_INTEGRATION_PATH={{ output "cursor" "--locate-shell-integration-path" "bash" | trim | quote }}
2+
if [[ -f "$__SHELL_INTEGRATION_PATH" && -n $VSCODE_PID ]]; then
3+
source "$__SHELL_INTEGRATION_PATH"
4+
fi
5+
unset __SHELL_INTEGRATION_PATH

0 commit comments

Comments
 (0)