You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e226285
Browse filesBrowse the repository at this point in the historyBrowse files
Write-Host"`nHint: If your editor is installed but not listed, you might need to add its command to your PATH."-ForegroundColor Yellow
62
-
Write-Host"Open your editor, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P), and find a command like: `"Shell Command: Install 'cursor' command in PATH`" (or 'agy-ide', etc.)."-ForegroundColor Yellow
63
-
64
61
if ($availableEditors.Count-eq0) {
65
62
Write-Host"Error: No supported editors found in your PATH."-ForegroundColor Red
66
63
Pause
67
64
exit1
68
65
}
69
66
70
-
Write-Host""
71
-
for ($i=0; $i-lt$availableEditors.Count; $i++) {
72
-
Write-Host"$($i+1)) $($availableEditors[$i])"
73
-
}
74
-
if ($availableEditors.Count-gt1) {
75
-
Write-Host"a) All detected editors"
76
-
}
77
-
Write-Host"q) Quit`n"
78
-
79
67
$autoChoice=$null
80
68
if ($targetScheme) {
81
69
for ($i=0; $i-lt$editorSchemes.Count; $i++) {
@@ -88,26 +76,37 @@ if ($targetScheme) {
88
76
89
77
if ($autoChoice) {
90
78
$choice=$autoChoice.ToString()
91
-
Write-Host"Automatically selected $($availableEditors[$autoChoice-1]) based on current editor ($targetScheme)."-ForegroundColor Green
92
79
} else {
93
-
$choice=Read-Host"Select where to install CWC to"
94
-
}
80
+
Write-Host"`nHint: If your editor is installed but not listed, you might need to add its command to your PATH."-ForegroundColor Yellow
81
+
Write-Host"Open your editor, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P), and find a command like: `"Shell Command: Install 'cursor' command in PATH`" (or 'agy-ide', etc.)."-ForegroundColor Yellow
95
82
96
-
if ($choice-eq'q'-or$choice-eq'Q') {
97
-
Write-Host"Installation cancelled."
98
-
Pause
99
-
exit0
100
-
} elseif ($choice-eq'a'-or$choice-eq'A') {
101
-
if ($availableEditors.Count-le1) {
102
-
Write-Host"Error: Invalid choice. Exiting."-ForegroundColor Red
103
-
Pause
104
-
exit1
83
+
Write-Host""
84
+
for ($i=0; $i-lt$availableEditors.Count; $i++) {
85
+
Write-Host"$($i+1)) $($availableEditors[$i])"
105
86
}
106
-
} else {
107
-
if ($choice-notmatch'^[0-9]+$'-or [int]$choice-lt1-or [int]$choice-gt$availableEditors.Count) {
108
-
Write-Host"Error: Invalid choice. Exiting."-ForegroundColor Red
87
+
if ($availableEditors.Count-gt1) {
88
+
Write-Host"a) All detected editors"
89
+
}
90
+
Write-Host"q) Quit`n"
91
+
92
+
$choice=Read-Host"Select where to install CWC to"
93
+
94
+
if ($choice-eq'q'-or$choice-eq'Q') {
95
+
Write-Host"Installation cancelled."
109
96
Pause
110
-
exit1
97
+
exit0
98
+
} elseif ($choice-eq'a'-or$choice-eq'A') {
99
+
if ($availableEditors.Count-le1) {
100
+
Write-Host"Error: Invalid choice. Exiting."-ForegroundColor Red
101
+
Pause
102
+
exit1
103
+
}
104
+
} else {
105
+
if ($choice-notmatch'^[0-9]+$'-or [int]$choice-lt1-or [int]$choice-gt$availableEditors.Count) {
106
+
Write-Host"Error: Invalid choice. Exiting."-ForegroundColor Red
echo"Hint: If your editor is installed but not listed, you might need to add its command to your PATH."
75
-
echo"Open your editor, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P), and find a command like: \"Shell Command: Install 'cursor' command in PATH\" (or 'agy-ide', etc.)."
76
-
77
73
if [ ${#AVAILABLE_EDITORS[@]}-eq 0 ];then
78
74
echo"Error: No supported editors found in your PATH."
79
75
exit 1
80
76
fi
81
77
82
-
echo""
83
-
foriin"${!AVAILABLE_EDITORS[@]}";do
84
-
echo"$((i+1))) ${AVAILABLE_EDITORS[$i]}"
85
-
done
86
-
if [ ${#AVAILABLE_EDITORS[@]}-gt 1 ];then
87
-
echo"a) All detected editors"
88
-
fi
89
-
echo"q) Quit"
90
-
echo""
91
-
92
78
TARGET_SCHEME="$1"
93
79
AUTO_CHOICE=""
94
80
@@ -103,28 +89,41 @@ fi
103
89
104
90
if [ -n"$AUTO_CHOICE" ];then
105
91
choice="$AUTO_CHOICE"
106
-
echo"Automatically selected ${AVAILABLE_EDITORS[$((choice-1))]} based on current editor ($TARGET_SCHEME)."
107
92
else
93
+
echo""
94
+
echo"Hint: If your editor is installed but not listed, you might need to add its command to your PATH."
95
+
echo"Open your editor, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P), and find a command like: \"Shell Command: Install 'cursor' command in PATH\" (or 'agy-ide', etc.)."
96
+
97
+
echo""
98
+
foriin"${!AVAILABLE_EDITORS[@]}";do
99
+
echo"$((i+1))) ${AVAILABLE_EDITORS[$i]}"
100
+
done
101
+
if [ ${#AVAILABLE_EDITORS[@]}-gt 1 ];then
102
+
echo"a) All detected editors"
103
+
fi
104
+
echo"q) Quit"
105
+
echo""
106
+
108
107
# Handle interactive prompt even if script is piped via curl | bash
109
108
if [ -c /dev/tty ];then
110
109
read -p "Select where to install CWC to: " choice < /dev/tty
0 commit comments