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 diff git -c delta.default-language='Bourne Again Shell (bash)' diff delta --default-language 'Bourne Again Shell (bash)' file1 file2 Moreover 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-language
option had been introduced initially in order to determine language forgit blame
(where there are no file names). However, subsequentlygit blame
came 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.ts
then the language is typescript). Meanwhiledefault-language
never actually acquired its obvious …