find-visual-studio-code-path ( -- path )


Vocabulary
editors.visual-studio-code

Inputs
None

Outputs
pathan object


Definition


Methods

M: visual-studio-code-base find-visual-studio-code-path
os {
{
linux
[
{
[ "code" which ]
[ "Code" which ]
[ "~/VSCode-linux-x64/Code" ]
[ "/usr/share/code/code" ]
} [ [ file-exists? ] 1guard ] map-compose 0||
]
}
{
macos
[
"com.microsoft.VSCode" find-native-bundle
[ "Contents/MacOS/Electron" append-path ] [ f ]
if*
]
}
{ windows [ "code.cmd" ] }
} case ;



M: visual-studio-code-exploration
find-visual-studio-code-path
os {
{ linux [ "code-exploration" which ] }
{
macos
[
"com.microsoft.VSCodeExploration"
find-native-bundle
[ "Contents/MacOS/Electron" append-path ] [ f ]
if*
]
}
{
windows
[
{ "Microsoft VS Code Exploration" }
"code-exploration.cmd" find-in-applications
]
}
} case ;



M: visual-studio-code-insiders find-visual-studio-code-path
os {
{ linux [ "code-insiders" which ] }
{
macos
[
"com.microsoft.VSCodeInsiders"
find-native-bundle
[ "Contents/MacOS/Electron" append-path ] [ f ]
if*
]
}
{
windows
[
{ "Microsoft VS Code Insiders" }
"code-insiders.cmd" find-in-applications
]
}
} case ;



M: visual-studio-codium find-visual-studio-code-path
os {
{ linux [ "codium" which ] }
{
macos
[
{ "com.visualstudio.code.oss" "com.vscodium" }
[ find-native-bundle ] map-find
[ "Contents/MacOS/Electron" append-path ] when
]
}
{
windows
[
{ "Microsoft VS Codium" } "codium.cmd"
find-in-applications
]
}
} case ;