From 4509034cddcbdb95d95ac6024725ad3ccba8876b Mon Sep 17 00:00:00 2001 From: Nils <4509493+NilsWildt@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:24:10 -0700 Subject: [PATCH] Update README.md Add example for Julia 1.11 --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4755796..4456265 100644 --- a/README.md +++ b/README.md @@ -59,16 +59,26 @@ alias runic="julia --project=@runic -m Runic" ``` > [!NOTE] -> The `-m` command line flag is only available in Julia 1.12 and later. In earlier versions -> you have to invoke the `main` function explicitly, for example: +> Running `Runic` in Julia 1.11 and Earlier: +> You have to invoke the `main` function explicitly, for example: > ```sh > julia -e 'using Runic; exit(Runic.main(ARGS))' -- > ``` +> as the `-m` command line flag is only available in Julia 1.12 and later. +> > For this incantation the following shell alias can be used: > ```sh > alias runic="julia --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' --" > ``` - +> Example usage: +> To format all julia files in the current directory inplace, just run: +> ```sh +> julia --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- "--inplace" "./" +> ``` +> or, if an alias was set up: +> ```sh +> runic --inplace ./ +> ``` ``` $ julia -m Runic --help NAME