ymattw / ydiff

View colored, incremental diff in workspace or from stdin, side by side and auto paged.
Other
877 stars 62 forks source link

configure default to side by side #84

Closed goldylucks closed 5 years ago

goldylucks commented 5 years ago

This tool is amazing!!

Is there an option to configure -s as default?

So I won't have to do ydiff -s every time. I know I can alias it in my shell, but I prefer to have all the logic contained in the program I'm using.

Maybe an option to add default=true directly in the file itself, something like ...

832     parser.add_option(
833         '-s', '--side-by-side', action='store_true', default=true
ymattw commented 5 years ago

I regretted not making -s default in the beginning, but changing default behavior is not a good idea. What you can do is either use a shell alias or export your preferred options into shell environment variable CDIFF_OPTIONS.

On Sat, 27 Jul 2019 at 16:06 Adam Goldman notifications@github.com wrote:

This tool is amazing!!

Is there an option to configure -s as default?

So I won't have to do ydiff -s every time. I know I can alias it in my shell, but I prefer to have all the logic contained in the program I'm using.

Maybe an option to add default=true directly in the file itself, something like ...

832 parser.add_option(833 '-s', '--side-by-side', action='store_true', default=true

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ymattw/ydiff/issues/84?email_source=notifications&email_token=AAKXRD4B22EGVMGXDEIE56DQBP6ZFA5CNFSM4IHIW4VKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB2YPEQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKXRD2TV3THV5N6V76AQPDQBP6ZFANCNFSM4IHIW4VA .

goldylucks commented 5 years ago

so ... how do I do this?

export CDIFF_OPTIONS=-s ? that doesn't seem right :)

krader1961 commented 5 years ago

@goldylucks This is what I use: export YDIFF_OPTIONS=-s -w0 --wrap -D'`

ymattw commented 5 years ago

Yes should be YDIFF_OPTIONS, it's mentioned in the README file, thank you @krader1961.

On Tue, Jul 30, 2019 at 2:34 AM Kurtis Rader notifications@github.com wrote:

@goldylucks https://github.com/goldylucks This is what I use: export YDIFF_OPTIONS=-s -w0 --wrap -D'`

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ymattw/ydiff/issues/84?email_source=notifications&email_token=AAKXRD43SSR3XYWD4KIIA6DQB4Z3PA5CNFSM4IHIW4VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3BTVVY#issuecomment-516111063, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKXRD2Z6B7DVZ5EABND43DQB4Z3PANCNFSM4IHIW4VA .