Skip to content

Commit 025718a

Browse files
committed
Updated interactive example for multiplatform compatibility.
1 parent 63462ac commit 025718a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/interactive_example.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@
2323
int main() {
2424
try {
2525
// Create shell instance withcommand
26-
MyShell shell("TERM=dumb vim -u NONE -n test.txt");
26+
MyShell shell(
27+
#ifdef _WIN32
28+
"TERM=dumb vim -u NONE -n test.txt"
29+
#else
30+
"vim test.txt"
31+
#endif
32+
);
2733

2834
shell.writeToShell("i"); // Insert mode
2935
shell.writeToShell("Hi"); // Write the text

0 commit comments

Comments
 (0)