fetch Verified current stable Not installed? Filesystem

Fetch / Fetch Package And Evaluate Classpath

Fetch Package And Evaluate Classpath

Fetch command syntax to fetch package and evaluate classpath. Copyable examples, output expectations, and common mistakes.

$
Terminal
CP="$(cs fetch --classpath org.scalameta::scalafmt-cli:latest.release)"

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Fetching package: org.scalameta::scalafmt-cli:latest.release
Successfully fetched: scalafmt-cli
Classpath variable set to: /path/to/scalafmt-cli.jar

Command Breakdown

What each part is doing

CP="$(cs
Base Command
The executable that performs this operation. Here it runs Fetch before the shell applies any redirect operators.
--classpath
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: CP="$(cs fetch --classpath org.scalameta::scalafmt-cli:latest.release)"

  2. Step 2

    Verify the classpath: echo $CP

Alternative Approaches

Comparable commands in other tools

Alternative filesystem tools for the same job.