@@ -11,8 +11,9 @@ import (
1111)
1212
1313type NvrhConfigServer struct {
14- NvimCmd []string `yaml:"nvim-cmd"`
14+ NvimCmd []string `yaml:"nvim-cmd,omitempty "`
1515 UsePorts * bool `yaml:"use-ports,omitempty"`
16+ SshArg []string `yaml:"ssh-arg,omitempty"`
1617}
1718
1819type NvrhConfig struct {
@@ -50,6 +51,7 @@ func LoadConfig(path string) (*NvrhConfig, error) {
5051var envIndex = map [string ][]string {
5152 "nvim-cmd" : {"NVRH_CLIENT_NVIM_CMD" },
5253 "use-ports" : {"NVRH_CLIENT_USE_PORTS" },
54+ "ssh-arg" : {"NVRH_CLIENT_SSH_ARG" },
5355}
5456
5557func ApplyPrecedence (c * cli.Command , sc NvrhConfigServer ) error {
@@ -68,6 +70,14 @@ func ApplyPrecedence(c *cli.Command, sc NvrhConfigServer) error {
6870 }
6971 }
7072
73+ if ! c .IsSet ("ssh-arg" ) && len (sc .SshArg ) > 0 {
74+ for _ , v := range sc .SshArg {
75+ if err := c .Set ("ssh-arg" , v ); err != nil {
76+ return err
77+ }
78+ }
79+ }
80+
7181 // Fall back to environment variables if still not set.
7282 for name , keys := range envIndex {
7383 if c .IsSet (name ) {
0 commit comments