11 Commits

Author SHA1 Message Date
Sylvie Crowe cba6b6a60f Add reload config (#2)
* add function that can clear cached config files

Once the first call to `Get()`, `GetStrict()`, `GetAll()`,
or`GetAllStrict()` has been made, the contents of the config files will
be cached for all future calls to any of those functions. This can be
frustrating if the user wants to capture changes to the config file that
were made externally. This
change adds the `ClearCachedConfigs()` function to provide control over
that.

* change ClearCachedConfigs to ReloadConfigs

Clearing cached data is somewhat vague and could be more confusing to
users who are not familiar with this library. But Reloading the config
data is very straightforward. For this reason, the ability to clear the
cache has been replaced with the ability to reload.

The reload simply clears the cache and then loads the contents again.

Additionally, this contains a bug fix that ensure the loadConfigs
pointer is set to a non-null value before it is used.

* add tests for reloading ssh config files

This adds 2 tests. The first checks that ssh config data is cached and
does not update if the file changes afterward. The second checks that
the `ReloadConfigs()` function will discard the cached data and load the
current config file contents.
2024-03-05 19:38:17 -08:00
Kevin Burke 3c7724c1bb README.md: update donate information 2022-11-08 20:20:52 -08:00
Kevin Burke a432d6fbae README: add more information 2022-03-31 09:31:12 -07:00
Dustin Spicuzza 124166206d Support retrieving multiple values for a given keyword
IdentityFile among others supports being provided multiple times and
aggregated across, potentially, multiple files. Support that workflow
by adding GetAll and GetAllStrict alongside the current functions.
2021-03-27 13:38:21 -07:00
Kevin Burke fc8c332031 fix example 2017-05-26 11:06:09 -07:00
Kevin Burke 6dcd4cf595 update README and add more examples 2017-05-25 22:05:04 -07:00
Kevin Burke 873a8ad95f add errata 2017-05-25 08:22:23 -07:00
Kevin Burke 8b24c0d360 improve the documentation 2017-05-25 08:16:57 -07:00
Kevin Burke bc2824eae3 tweak readme again 2017-04-23 11:47:51 -07:00
Kevin Burke 67c39ca6b4 Implement Get and wildcard match
Lots of changes and new API's here.

Fixes #7.
2017-04-23 11:42:22 -07:00
Kevin Burke c07ebbe98d add very basic README 2017-04-17 11:24:14 -07:00