File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 55Fixed an issue where file extensions of the form ` *.foo.bar `
66(e.g. ` *.cmake.in ` ) were ignored.
77
8- Removed the ` --language ` option.
8+ Added an option ` --override ` which overrides language detection based,
9+ on a glob, e.g. ` --override='*.js:javascript jsx'. See ` --help` for
10+ full documentation and more examples.
11+
12+ Removed the ` --language ` option. This option was confusing (it took a
13+ file extension rather than a language name) and not very useful
14+ (it overrode language detection for all files together).
915
1016### Parsing
1117
Original file line number Diff line number Diff line change @@ -212,21 +212,23 @@ inline: A single column display, closer to traditional diff display.")
212212 . arg (
213213 Arg :: new ( "override" ) . long ( "override" )
214214 . value_name ( "GLOB:NAME" )
215- . help ( "Associate this glob pattern with this language, overriding normal language detection.
215+ . help ( concat ! ( "Associate this glob pattern with this language, overriding normal language detection. For example:
216216
217- --override='*.c:C++'
218-
219- This argument may be given more than once.
217+ $ " , env!( "CARGO_BIN_NAME" ) , " --override='*.c:C++' old.c new.c
220218
221219Language names are matched case insensitively. Overrides may also specify the language \" text\" to treat a file as plain text.
222220
223- --override='CustomFile:json' --override='*.c:text'
221+ This argument may be given more than once. For example:
222+
223+ $ " , env!( "CARGO_BIN_NAME" ) , " --override='CustomFile:json' --override='*.c:text' old.c new.c
224224
225225To configure multiple overrides using environment variables, difftastic also accepts DFT_OVERRIDE_1 up to DFT_OVERRIDE_9.
226226
227- DFT_OVERRIDE='CustomFile:json' DFT_OVERRIDE_1='*.c:text' DFT_OVERRIDE_2='*.js:javascript jsx'
227+ $ export DFT_OVERRIDE='CustomFile:json'
228+ $ export DFT_OVERRIDE_1='*.c:text'
229+ $ export DFT_OVERRIDE_2='*.js:javascript jsx'
228230
229- When multiple overrides are specified, the first matching override wins." )
231+ When multiple overrides are specified, the first matching override wins." ) )
230232 . env ( "DFT_OVERRIDE" )
231233 . multiple_occurrences ( true )
232234 )
You can’t perform that action at this time.
0 commit comments