File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,22 @@ _versionof() {
2727 fi
2828}
2929
30+ _inside_ai_coding_tool () {
31+ # Seems to detect Cursor inline terminals as of July 2025
32+ [[ -n " $COMPOSER_NO_INTERACTION " ]]
33+ }
34+
3035# ENVIRONMENT VARIABLES {{{1
3136
3237if _has less; then
3338 export PAGER=less
3439 export LESS=' -Ri'
3540fi
3641
37- if [ " $TERM_PROGRAM " = " vscode" ]; then
38- export EDITOR=code VISUAL=less
39- # Cursor agents get hung up with git commands sometimes
42+ if _inside_ai_coding_tool ; then
4043 export GIT_PAGER=cat
44+ elif [ " $TERM_PROGRAM " = " vscode" ]; then
45+ export EDITOR=code VISUAL=less
4146elif _has vim; then
4247 export EDITOR=vim VISUAL=vim
4348elif _has vi; then
@@ -855,8 +860,7 @@ simpleprompt() {
855860 PS1=" $ "
856861}
857862
858- if [ " $TERM_PROGRAM " = " vscode" ]; then
859- # Use simple prompt for Cursor & LLMs
863+ if _inside_ai_coding_tool ; then
860864 simpleprompt
861865elif [ -n " $SUDO_USER " ]; then
862866 colorprompt ' 33;1'
You can’t perform that action at this time.
0 commit comments