mookid / diffr

Yet another diff highlighting tool
MIT License
572 stars 22 forks source link

Default parameters from environment variable #82

Closed xeruf closed 1 year ago

xeruf commented 2 years ago

I always use a certain set of switches (--colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33) and would like to have that whereever I invoke diffr, currently I have to always work with aliases. An environment variable for default flags as fzf has with FZF_DEFAULT_OPTS would be great.

mookid commented 1 year ago

I encourage you to use a wrapper script for your use case. env variables add more complexity in diffr code and are more things to document. let's keep it simple