I found the exact same issue! Here's a .bashrc snippet you can steal to extract from a multitude of files.
It doesn't quite have the number of features your library does and only supports extracting.
[0] https://github.com/popey456963/bashrc/blob/gh-pages/bashrc.t...