Consider the following question: "is there a cached username for realm R?".
Trying to answer it via 'svn auth', I run into two problems: 1. I need to fnmatch-escape R. That means I need to escape [ and ] specially before calling 'svn auth'. 2. I need to filter the results for those where the listed realm is strcmp-equal to R. That's because the match is a substring match, considers fields other than the realmstring, and * and ? (if they occur in R) may match other realms besides the intended one. Is there a way to make it easier to answer that question via 'svn auth'? For my use-case, I care just about one specific realm for which (1) is not a concern, and (2) I do in the caller as a post-processing of "svn auth"'s output. But it seems writing a generic 'svn auth' wrapper that DTRTs on usernames and realms that contain * would be a little tricky. Daniel P.S. This problem reminds 'svn log --search': there is structured data (svn:log,svn:author,svn:date; svn:realmstring,hostname,username) that needs to be searched.