pacdiff: Search and give warnings for older pacsave.[0-9]* files

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: clean up and reword --help

Clean up and reword --help
get rid of all the echos to make it easier to read in source.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: allow multiple separated options

loop over arguments, this will allow adding options such as --nocolor

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: add --nocolor option for the terminally challenged.

Allow colors to be disabled for use on broken/serial terminals.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: rework search type handling, add --find option

change cmd tests to if (( FIND ))... as it is cleaner.  All search cmds
have an option and a variable initialized to zero. the active option
should be set to 1.  Add a switch to exclude multiple search options.
set the default when all are equal to zero.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: improve speed, accuracy finding active configs using pacmandb

This is a new search type, using -p or --pacmandb options. It reads
config file locations directly from the local pacman db. It will find
active configs anywhere they are defined in installed packages. It is
not dependant on outside configs such as updatedb.conf or scanning a
large set of directories for find.

This will find more pacnews than find when searching with the current
default of /etc, and it is faster than both find and updatedb when
searching the entire fs. When run directly after an update, the local db
is more likely to be cached than all files in /etc or / as other methods
read. This will increase performance further post upgrade.

After a package is removed and a pacsave is created, this method will
not find these pacsaves until the base config is added to the local db
again. These files have no influence in a working system and only take
up a few blocks of disk space.

Active configs need to be dealt with immediately to keep a system
working. pacsaves related to removed configs can remain for weeks or
months without problems. I would recommend occasionally running other
methods such as --locate to remove them.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: make pacmandb search the default type.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: provide an --output option to show any .pac* files

This is an option to just echo's the pacnews/pacsaves instead of merging
or removing them. This can be used to check the config status such as in
a cron job without modifying the system.

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>
pacdiff: ask to run updatedb for --locate

Signed-off-by: Jonathan Frazier <eyeswide@gmail.com>