browse-at-remote
browse-at-remote copied to clipboard
Break `git remote` output at line boundaries.
The prior version of this function uses (s-split "\\W+" remotes)
to turn the
output from git remote
into a list of remote names, but "\W+" matches any run
of characters that is not a word constituent, including '-', so remote names
containing hyphens get broken into two strings. git remote
prints one remote
name per line, so breaking on lines makes more sense.
For example (strictly hypothetically), suppose we have:
$ git remote
gfx-rs
jimblandy
kvark
$
In the prior code, this produces the list:
("gfx" "rs" "jimblandy" "kvark")
and things don't end well. Breaking on lines produces:
("gfx-rs" "jimblandy" "kvark")