Skip to content

Commit

Permalink
Update usage section in README
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykMroczek committed Feb 18, 2024
1 parent 2d0503f commit 0ed91f8
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,48 @@ so if you are using Git, you can delegate running *mofmt* to

### Usage

*mofmt* takes one kind of argument - path that points to Modelica source
file or directory that is supposed to contain such files. *mofmt* can
accept multiple such arguments.
**mofmt** expects one or more paths that point to either Modelica source files, or to directories with such files:

```shell
mofmt PATH ...
mofmt <PATHS>
```

So you can format a single file:

```shell
mofmt foo.mo
```

or multiple files:

```shell
mofmt foo.mo bar.mo baz.mo
```

or all files inside the directory (**mofmt** searches for files recursively):

```shell
mofmt ./foo-dir
```

or all files inside multiple directories

```shell
mofmt ./foo-dir ./bar-dir
```

or you can mix both files and directories:

```shell
mofmt ./foo-dir foo.mo bar.mo ./bar-dir baz.mo
```

**mofmt** can run in *check mode*. In this mode files are not modified, instead
**mofmt** checks the formatting in the original file, and reports an error in
case of a failure:

```shell
mofmt --check <PATHS>
```

## TODO
Expand Down

0 comments on commit 0ed91f8

Please sign in to comment.