# HG changeset patch # User wenzelm # Date 1573571523 -3600 # Node ID 67c2fed5b0e942e75bf17c8bf7a6a30e602d8645 # Parent f31903cc57b01d5a9e6dd29e5c1eb9cf15bdbe59 more options; diff -r f31903cc57b0 -r 67c2fed5b0e9 src/Pure/Tools/phabricator.scala --- a/src/Pure/Tools/phabricator.scala Tue Nov 12 16:02:29 2019 +0100 +++ b/src/Pure/Tools/phabricator.scala Tue Nov 12 16:12:03 2019 +0100 @@ -105,6 +105,7 @@ val isabelle_tool1 = Isabelle_Tool("phabricator", "invoke command-line tool within Phabricator home directory", args => { + var list = false var name = default_name val getopts = @@ -112,18 +113,26 @@ Usage: isabelle phabricator [OPTIONS] COMMAND [ARGS...] Options are: + -l list available Phabricator installations -n NAME Phabricator installation name (default: """ + quote(default_name) + """) Invoke a command-line tool within the home directory of the named Phabricator installation. """, + "l" -> (_ => list = true), "n:" -> (arg => name = arg)) val more_args = getopts(args) - if (more_args.isEmpty) getopts.usage() + if (more_args.isEmpty && !list) getopts.usage() val progress = new Console_Progress + if (list) { + for (config <- read_config()) { + progress.echo("phabricator " + quote(config.name) + " in " + config.root.implode) + } + } + val config = get_config(name) val result = progress.bash(Bash.strings(more_args), cwd = config.home.file, echo = true)