# HG changeset patch # User wenzelm # Date 1647950701 -3600 # Node ID c5da08c5b01b0e45e2f1ef87cafbf3e651a6af74 # Parent 4ce0a4d90dfa085e1ddd986c6d8270b24682f1bc support console output, e.g. "isabelle vscode -C -- --help"; diff -r 4ce0a4d90dfa -r c5da08c5b01b src/Tools/VSCode/src/vscode_main.scala --- a/src/Tools/VSCode/src/vscode_main.scala Tue Mar 22 12:48:27 2022 +0100 +++ b/src/Tools/VSCode/src/vscode_main.scala Tue Mar 22 13:05:01 2022 +0100 @@ -39,7 +39,7 @@ Bash.strings(electron :: args0 ::: args) + (if (background) " > /dev/null 2> /dev/null &" else "") - Isabelle_System.bash(script, env = env) + progress.bash(script, env = env, echo = true) } @@ -76,21 +76,30 @@ val isabelle_tool = Isabelle_Tool("vscode", "Isabelle/VSCode interface wrapper", Scala_Project.here, args => { + var console = false + val getopts = Getopts(""" -Usage: isabelle vscode -- VSCODE_OPTIONS +Usage: isabelle vscode [OPTIONS] [-- VSCODE_OPTIONS ...] + + -C run as foreground process, with console output Start Isabelle/VSCode application, with automatic configuration of user settings. The following initial settings are provided for a fresh installation: -""" + default_settings) +""" + default_settings, + "C" -> (_ => console = true)) val more_args = getopts(args) - val progress = new Console_Progress() + init_settings() - init_settings() - run_cli(List("--version")).check - run_cli(more_args, background = true, progress = progress).check + if (console) { + run_cli(more_args, progress = new Console_Progress()).check + } + else { + run_cli(List("--version")).check + run_cli(more_args, background = true).check + } }) }