Skip to content

Commit f10c87d

Browse files
committed
Small style fixes
Add function keyword to function declaration Add comment describing URLs this feature handles
1 parent 8d78ef8 commit f10c87d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-open

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ ssh_config=${ssh_config:-~/.ssh/config}
6161
# Resolves an ssh alias defined in ssh_config to it's corresponding hostname
6262
# echos out result, should be used within subshell $( ssh_resolve $host )
6363
# echos out nothing if alias could not be resolved
64-
ssh_resolve() {
64+
function ssh_resolve() {
6565
domain="$1"
6666
ssh_found=true
6767
# Filter to only ssh_config lines that start with "Host" or "HostName"
@@ -101,6 +101,7 @@ ssh_resolve() {
101101
# http[s]://host.xz[:port]/path/to/repo.git/
102102
# ftp[s]://host.xz[:port]/path/to/repo.git/
103103
# [user@]host.xz:path/to/repo.git/ - scp-like but is an alternative to ssh.
104+
# [user@]hostalias:path/to/repo.git/ - handles host aliases defined in ssh_config(5)
104105

105106
# Determine whether this is a url (https, ssh, git+ssh...) or an scp-style path
106107
if [[ "$giturl" =~ ^[a-z\+]+://.* ]]; then

0 commit comments

Comments
 (0)