-
Notifications
You must be signed in to change notification settings - Fork 123
Integrations
C# REPL is a standalone tool, and it also fits into other developer environments.
Add a profile to Windows Terminal's settings.json, under the profiles.list property:
{
"name": "C# REPL",
"commandline": "csharprepl"
}For the colors shown in the README screenshots, install the Windows Terminal Dracula theme.
Run csharprepl in the VS Code terminal. To send code from the editor to the REPL, use the built-in Terminal: Run Selected Text In Active Terminal command (workbench.action.terminal.runSelectedText) from the Command Palette.
This PowerShell command creates a Start Menu shortcut that launches C# REPL in Windows Terminal:
$shell = New-Object -ComObject WScript.Shell
$shortcut = $shell.CreateShortcut("$env:appdata\Microsoft\Windows\Start Menu\Programs\csharprepl.lnk")
$shortcut.TargetPath = "wt.exe"
$shortcut.Arguments = "-w 0 nt csharprepl.exe"
$shortcut.Save()A short alias saves typing.
-
Windows: create a
.cmdfile on yourPATH, for exampleC:\Users\<username>\.dotnet\tools\csr.cmd, containing:wt -w 0 nt csharprepl
You can then launch C# REPL by running
csr. -
Linux and macOS: add this to
~/.bashrc:alias cs=csharprepl