Skip to content
This repository was archived by the owner on Jan 17, 2021. It is now read-only.

Update --bind flag help text #119

Merged
merged 4 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *rootCmd) RegisterFlags(fl *flag.FlagSet) {
fl.BoolVar(&c.skipSync, "skipsync", false, "skip syncing local settings and extensions to remote host")
fl.BoolVar(&c.syncBack, "b", false, "sync extensions back on termination")
fl.BoolVar(&c.printVersion, "version", false, "print version information and exit")
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for ssh tunnel")
fl.StringVar(&c.bindAddr, "bind", "", "local bind address for SSH tunnel, in [HOST][:PORT] syntax (default: 127.0.0.1)")
fl.StringVar(&c.sshFlags, "ssh-flags", "", "custom SSH flags")
}

Expand Down
4 changes: 2 additions & 2 deletions sshcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ func sshCode(host, dir string, o options) error {
}

func parseBindAddr(bindAddr string) (string, error) {
if bindAddr == "" {
bindAddr = ":"
if !strings.Contains(bindAddr, ":") {
bindAddr += ":"
}

host, port, err := net.SplitHostPort(bindAddr)
Expand Down