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" ]
} [ dup file-exists? [ drop f ] unless ]
map-compose 0||
]
}
{
macosx
[
"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 ] }
{
macosx
[
"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 ] }
{
macosx
[
"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 ] }
{
macosx
[
{ "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 ;