| 202 | } |
| 203 | |
| 204 | func (o sshConfigOptions) asList() (list []string) { |
| 205 | if o.waitEnum != "auto" { |
| 206 | list = append(list, fmt.Sprintf("wait: %s", o.waitEnum)) |
| 207 | } |
| 208 | if o.userHostPrefix != "" { |
| 209 | list = append(list, fmt.Sprintf("ssh-host-prefix: %s", o.userHostPrefix)) |
| 210 | } |
| 211 | if o.hostnameSuffix != "" { |
| 212 | list = append(list, fmt.Sprintf("hostname-suffix: %s", o.hostnameSuffix)) |
| 213 | } |
| 214 | if o.disableAutostart { |
| 215 | list = append(list, fmt.Sprintf("disable-autostart: %v", o.disableAutostart)) |
| 216 | } |
| 217 | for _, opt := range o.sshOptions { |
| 218 | list = append(list, fmt.Sprintf("ssh-option: %s", opt)) |
| 219 | } |
| 220 | for _, h := range o.header { |
| 221 | list = append(list, fmt.Sprintf("header: %s", h)) |
| 222 | } |
| 223 | if o.headerCommand != "" { |
| 224 | list = append(list, fmt.Sprintf("header-command: %s", o.headerCommand)) |
| 225 | } |
| 226 | |
| 227 | return list |
| 228 | } |
| 229 | |
| 230 | func (r *RootCmd) configSSH() *serpent.Command { |
| 231 | var ( |