@c -*- texinfo -*-

@chapter Configuration Files

While @b{BashStyle-NG} is able to auto-generate the configuration files based on
your choices in the UI, you might want to do manual additions as well.

@heading Main Configuration Files
@itemize @bullet

@item Factory Configuration: @file{$INSTALL_PREFIX/share/bashstyle-ng/bashstyle-ng.ini}
@item Vendor Configuration: @file{/etc/bashstyle-ng_vendor.ini}
@item User Configuration: @file{~/.bashstyle-ng.ini}
@item User Backup Configuration: @file{~/.bashstyle-ng.ini.save}
@end itemize

@heading Configuration File Handling
@itemize @bullet

@item Configuration Files are versioned using the @code{ini_version} parameter,
which ensures your User or Vendor configuration is up to date.

@item If no User Configuration exists, @b{BashStyle-NG} will create the default one
using
@itemize @bullet

@item Vendor Configuration (if it exists and has the latest @code{ini_version})
@item Factory Configuration
@end itemize

@item If the User Configuation is outdated, @b{BashStyle-NG} will update it using
@itemize @bullet

@item Vendor Configuration (if it exists and has the latest @code{ini_version})
@item Factory Configuration
@end itemize

@item If the User Configuation is malformed, @b{BashStyle-NG} will try to restore it
using
@itemize @bullet

@item User Backup Configuration (if it exists and has the latest @code{ini_version})
@end itemize

@item If that is not possible, it will create the default one using
@itemize @bullet

@item Vendor Configuration (if it exists and has the latest @code{ini_version})
@item Factory Configuration
@end itemize
@end itemize

@heading Additional Configuration Files
@itemize @bullet

@item @file{~/.inputrc.custom}: custom non-managed readline settings, loaded after @code{~/.inputrc}
@item @file{~/.vimrc.custom}: custom non-managed vim settings, loaded after @file{~/.vimrc}
@item @file{~/.bashstyle.custom}: custom non-managed bash settings, always loaded
after @b{BashStyle-NG} start so variables and functions provided by @b{BashStyle-NG} can
reliably be used
@end itemize

@heading Configuration File handling in User Interface

In the @b{BashStyle-NG} @code{Configuration Files} section you are able to
@itemize @bullet

@item view versions of the configuration files
@item backup your User configuration
@item restore User Backup configuration
@item restore Vendor configuration (if it exists and has the lastest
@code{ini_version}), else Factory configuration
@item edit @file{~/.bashrc} (uses xdg-open)
@item edit @file{~/.bashstyle.custom} (uses xdg-open)
@item edit @file{~/.inputrc.custom} (uses xdg-open, file is created if it doesn't exist)
@item edit @file{~/.vimrc.custom} (uses xdg-open, file is created if it doesn't exist)
@end itemize

Using @code{Restart BashStyle-NG} you can reload the whole UI, this allows you
to refresh the UI when you fully reverted to a backup or vendor/factory config.

@defvr {Setting} debug_verbose Verbose output on start
@b{BashStyle-NG} does intensive logging upon Bash session start. If you want
visible logging enable this option. Usually you don't need this and thus it's
disabled by default.
@end defvr

@float Figure,fig:screenshot_config
@center @image{screenshots/bashstyle-ng_config,,, BashStyle-NG Config File UI, png}
@caption{Config File UI}
@end float