https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5
1. It is possible to add multiple whitespace characters between the keyword (i.e. Host) and the argument(s).
2. It is allowed to have a single = and whitespace between the keyword and the argument(s).
3. It is possible to add multiple host names under a single Host directive by spacing the names apart.
1. and 3. are actual conventions that we use in our team, and I couldn't get auto-complete working for fish without this modification.
Modification explained:
a. The space between Host(?:name)? and the \w.* was replaced by (?:\s+|\s*=\s*) to match any sequence of whitespace characters, or optional whitespaces with a single =, per spec.
b. Result of first replacement is piped through another string replace to switch duplicate whitespace characters to a single space, and then piped to be split by that space. This allows specifying several aliases or host names in a single Host/Hostname definition, also per spec.
I believe apm must have been buggy - example output that I found online
showed `tr` was mangling paths with spaces in it. Should be fixed.
Also, use dscl on OS X in __fish_complete_users.fish like
__fish_print_users.fish already does.
This is to the benefit of systems with ancient GNU sed, which does not
recognize "-E", but only "-r".
Fixes#2305 - even if it doesn't replace all `sed -E` invocations in the
codebase, the others are unlikely to occur on CentOS and other similarly
crusty systems.
Valid DNS names cannot have a | character and hashed ssh hosts
always begin with the | character. Therefore we ignore lines that
begin with |.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>