Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Commit 6b444ae

Browse files
committed
Add description of option -o/--output in README.md
1 parent bf1b930 commit 6b444ae

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ yarn link
3535
```
3636

3737
## Usage
38-
This tool will produce single source file from multiple C/C++ files and display produced content on standard output.
38+
This tool will produce single source file from multiple C/C++ files. By default produced content is displayed on
39+
the standard output. To save it into a file use option `-o` or `--output`.
40+
3941
File passed as an argument will be processed similarly to what preprocessor would do. It means all included local
4042
files (ex. `#include "header.hpp"`) will processed and added to output in place of the include directive.
4143
Program will search for include files first in directory where currently processed file is located and then in
@@ -65,10 +67,14 @@ Process `main.cpp` and display produced content on standard output:
6567
cpp-merge main.cpp
6668
```
6769

68-
Process `main.cpp` and redirect output to file `single.cpp`:
70+
Process `main.cpp` and save output to file `single.cpp`:
6971
```
7072
cpp-merge main.cpp > single.cpp
7173
```
74+
or:
75+
```
76+
cpp-merge --output single.cpp main.cpp
77+
```
7278

7379
Specify additional include and source directory:
7480
```

0 commit comments

Comments
 (0)