You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-31Lines changed: 39 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,11 @@ Prerequisite: jdk11+
25
25
*[Regular Scala REPL](#regular-scala-repl)
26
26
*[Ammonite](#ammonite)
27
27
*[scala-cli](#scala-cli)
28
+
-[Prerequisite for all of the below: run `sbt stage` or download the latest release](#prerequisite-for-all-of-the-below-run-sbt-stage-or-download-the-latest-release)
28
29
-[REPL](#repl)
30
+
*[run with defaults](#run-with-defaults)
31
+
*[customize prompt, greeting and exit code](#customize-prompt-greeting-and-exit-code)
32
+
*[execute some predef code](#execute-some-predef-code)
29
33
*[Operators: Redirect to file, pipe to external command](#operators-redirect-to-file-pipe-to-external-command)
30
34
*[Add dependencies with maven coordinates](#add-dependencies-with-maven-coordinates)
*[Updating the Scala version](#updating-the-scala-version)
60
64
*[Updating the shaded libraries](#updating-the-shaded-libraries)
61
65
-[Fineprint](#fineprint)
62
-
66
+
63
67
## Benefits over / comparison with
64
68
65
69
### Regular Scala REPL
@@ -87,27 +91,31 @@ Stock Scala REPL:<br/>
87
91
* srp has a 66.6% shorter name :slightly_smiling_face:
88
92
scala-cli wraps and invokes the regular Scala REPL (by default; or optionally Ammonite). It doesn't modify/fix the REPL itself, i.e. the above mentioned differences between srp and the stock scala repl (or alternatively Ammonite) apply, with the exception of dependencies: scala-cli does let you add them on startup as well.
89
93
94
+
## Prerequisite for all of the below: run `sbt stage` or download the latest release
### Operators: Redirect to file, pipe to external command
108
116
Inspired by unix shell redirection and pipe operators (`>`, `>>` and `|`) you can redirect output into files with `#>` (overrides existing file) and `#>>` (create or append to file), and use `#|` to pipe the output to a command, such as `less`:
109
117
```scala
110
-
srp
118
+
./srp
111
119
112
120
scala>"hey there"#>"out.txt"
113
121
scala>"hey again"#>>"out.txt"
@@ -162,7 +170,7 @@ All operators are prefixed with `#` in order to avoid naming clashes with more b
162
170
### Add dependencies with maven coordinates
163
171
Note: the dependencies must be known at startup time, either via `--dep` parameter:
If one or multiple of your resolvers require authentication, you can configure your username/passwords in a [`credentials.properties` file](https://get-coursier.io/docs/other-credentials#property-file):
@@ -391,14 +399,14 @@ The prefix is arbitrary and is only used to specify several credentials in a sin
Then attach your favorite IDE / debugger on port 5005.
398
406
399
407
If you want to debug a script, it's slightly different. Scripts are executed in a separate subprocess - just specify the following parameter (and make sure `JAVA_OPTS` isn't also set).
0 commit comments