Skip to content

Commit fd928cc

Browse files
authored
Document fnmatch pattern syntax
Closes simonw#27
1 parent acbe107 commit fd928cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ This will output the contents of every file, with each file preceded by its rela
4141
files-to-prompt path/to/directory --include-hidden
4242
```
4343

44+
- `--ignore <pattern>`: Specify one or more patterns to ignore. Can be used multiple times. Patterns may match file names and directory names, unless you also specify `--ignore-files-only`. Pattern syntax uses [fnmatch](https://docs.python.org/3/library/fnmatch.html), which supports `*`, `?`, `[anychar]`, `[!notchars]` and `[?]` for special character literals.
45+
```bash
46+
files-to-prompt path/to/directory --ignore "*.log" --ignore "temp*"
47+
```
48+
4449
- `--ignore-files-only`: Include directory paths which would otherwise be ignored by an `--ignore` pattern.
4550

4651
```bash
@@ -53,11 +58,6 @@ This will output the contents of every file, with each file preceded by its rela
5358
files-to-prompt path/to/directory --ignore-gitignore
5459
```
5560

56-
- `--ignore <pattern>`: Specify one or more patterns to ignore. Can be used multiple times. Patterns may match file names and directory names, unless you also specify `--ignore-files-only`.
57-
```bash
58-
files-to-prompt path/to/directory --ignore "*.log" --ignore "temp*"
59-
```
60-
6161
- `-c/--cxml`: Output in Claude XML format.
6262

6363
```bash

0 commit comments

Comments
 (0)