3

I've made several modifications manually in tig, and I want to store them.

How can I save the current set of changed tig options into a file (the ones, that I can toggle using the (o) key in tig) ?

(I know about .tigrc, so if there is a way to force tig to dump the current settings into its .tigrc file, I guess it will suffice ...)

Dangelov
  • 701
  • 6
  • 14

2 Answers2

6

As of version 2.1 of tig this can now be done from within tig by typing : to get into the command mode and then save-options <filename>.

All options are then dumped to the named file regardless of their state in any of the configuration files.

cfi
  • 10,915
  • 8
  • 57
  • 103
0

With Tig 2.5.4, the :save-options runtime command saves to "tig-options.txt" in current directory by default

Its up to you to mv tig-options.txt ~/.tigrc to implement those new options as new global default

I did run into an error

  tig
tig warning: ~/.tigrc:26: Value must be between 0 and 1024
tig warning: Errors while loading /c/Users/user/.tigrc.

There was some random option (forget name) that was -50, which caused validation failure. I had to remove that part manually.

set main-view = line-number:no,interval=5 id:yes,color=no date:relative-compact,local=no,format= author:abbreviated commit-title:yes,graph=v2,refs=yes,xyz=-50

Kevin
  • 2,761
  • 1
  • 27
  • 31