jbangdev / jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
https://jbang.dev
MIT License
1.4k stars 156 forks source link

`--help` should show `--repos` #1699

Open koppor opened 11 months ago

koppor commented 11 months ago

I check jbang --help for <available options. According to https://github.com/jbangdev/jbang/issues/1377, there should be --repos. However, I do not find it (see below for the full --help output)

--repos works though

Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
jbang is a tool for building and running .java/.jsh scripts and jar packages.
Usage: jbang [-hV] [--insecure] [--preview] [--config=] [--verbose |
             --quiet] [-o | --fresh] [COMMAND]

  jbang init hello.java [args...]
        (to initialize a script)
  or  jbang edit --open=code --live hello.java
        (to edit a script in IDE with live updates)
  or  jbang hello.java [args...]
        (to run a .java file)
  or  jbang gavsearch@jbangdev [args...]
        (to run a alias from a catalog)
  or  jbang group-id:artifact-id:version [args...]
        (to run a .jar file found with a GAV id)

      --config=   Path to config file to be used instead of the default
      --fresh             Make sure we use fresh (i.e. non-cached) resources.
  -h, --help              Display help/info. Use 'jbang  -h' for
                            detailed usage.
      --insecure          Enable insecure trust of all SSL certificates.
  -o, --offline           Work offline. Fail-fast if dependencies are missing.
                            No connections will be attempted
      --preview           Enable jbang preview features
      --quiet             jbang will be quiet, only print when error occurs.
  -V, --version           Display version info (use `jbang --verbose version`
                            for more details)
      --verbose           jbang will be verbose on what it does.

Essentials:
  run         Builds and runs provided script.
  build       Compiles and stores script in the cache.

Editing:
  init        Initialize a script.
  edit        Setup a temporary project to edit script in an IDE.

Caching:
  cache       Manage compiled scripts in the local cache.
  export      Export the result of a build.
  jdk         Manage Java Development Kits installed by jbang.

Configuration:
  config      Read and write configuration options.
  trust       Manage which domains you trust to run scripts from.
  alias       Manage aliases for scripts.
  template    Manage templates for scripts.
  catalog     Manage Catalogs of aliases.
  app         Manage scripts installed on the user's PATH as commands.

Other:
  completion  Output auto-completion script for bash/zsh.
              Usage: source <(jbang completion)
  info        Provides info about the script for tools (and humans who are
                tools).
  version     Display version info.
  wrapper     Manage jbang wrapper for a folder.

Copyright: 2020-2023 jbang.dev contributors, License: MIT
Website: https://jbang.dev

maxandersen commented 11 months ago

Jbang defaults to run if nothing else specified.

So jbang run --help will give you those details.

What jbang shows by default Are the high level help.

koppor commented 11 months ago

The thing why I wondered is, because I try to run using following pattern

 or  jbang hello.java [args...]
        (to run a .java file)

Therefore, I expected jbang --help to show me more information on that.

Maybe,

run         Builds and runs provided script.

should be changed to

run         Builds and runs provided script. (default command; use run --help for more information)

To make it explicit

maxandersen commented 11 months ago

Makes sense.

Might have to find a way to not have it be that wide but Im sure we Can find a way.

Want to do a PR ?

maxandersen commented 2 days ago

fixed/improved in #1844