How --default-language option works? #858
-
|
Some times But I try to utilize it in several ways, and neither is successful. git config delta.default-language 'Bourne Again Shell (bash)'
git diffgit -c delta.default-language='Bourne Again Shell (bash)' diffdelta --default-language 'Bourne Again Shell (bash)' file1 file2Moreover there are open feature requests with similar purposes: #485, #499. Do I correctly understand purpose of the option? Or maybe the option is buggy? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Hi @alefbragin, I'm sorry, you hit upon an option which I had introduced for one purpose, but not announced, and was not doing what one would expect. I've fixed that now in #859 (so if you can compile Rust and would like to test that branch then great!). Here's what I wrote there: The Note that the best place to set |
Beta Was this translation helpful? Give feedback.
-
|
The argument to or Or, add to per-repository git config ( [delta]
default-language = bash # or "sh" |
Beta Was this translation helpful? Give feedback.
Hi @alefbragin, I'm sorry, you hit upon an option which I had introduced for one purpose, but not announced, and was not doing what one would expect. I've fixed that now in #859 (so if you can compile Rust and would like to test that branch then great!). Here's what I wrote there:
The
default-languageoption had been introduced initially in order to determine language forgit blame(where there are no file names). However, subsequentlygit blamecame to determine the language by inspecting the command line of the calling process (e.g. if delta sees the calling process isgit blame src/file.tsthen the language is typescript). Meanwhiledefault-languagenever actually acquired its obvious …