Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e224c15

Browse files
authored
Reintroduces exceptions in glob docs
Exceptions are possible, just not very intuitive. Updated the docs to reflect this.
1 parent a9e7832 commit e224c15

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ The commands in the CLI accept any number of arguments. This means you _could_ p
258258

259259
However, it's recommended to instead use quotes, which means that Ruby is responsible for performing the file path expansion instead. This ensures a consistent experience across different environments and shells. The globs must follow the Ruby-specific globbing syntax as specified in the documentation for [Dir](https://ruby-doc.org/core-3.1.1/Dir.html#method-c-glob).
260260

261+
Baked into this syntax is the ability to provide exceptions to file name patterns as well. For example, if you are in a Rails app and want to exclude files named `schema.rb` but write all other Ruby files, you can use the following syntax:
262+
263+
```shell
264+
stree write "**/{[!schema]*,*}.rb"
265+
```
266+
261267
## Library
262268

263269
Syntax Tree can be used as a library to access the syntax tree underlying Ruby source code.

0 commit comments

Comments
 (0)