Skip to content
Open
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ sqlcmd config connection-strings
sqlcmd config view
```

#### Custom Configuration Files

You can specify a custom configuration file using the `--sqlconfig` flag. Configuration files must be in **YAML format** and use the `.yaml` or `.yml` file extension.

Example:
```
sqlcmd config --sqlconfig ./myproject.yaml add-endpoint --name ep1434 --address localhost --port 1434
sqlcmd config --sqlconfig ./myproject.yaml view
```

**Note:** The default configuration file at `~/.sqlcmd/sqlconfig` is an exception and uses YAML format without an extension. When specifying a custom configuration file, always use the `.yaml` or `.yml` extension to avoid errors.

### Versions

To see all version tags to choose from (2017, 2019, 2022 etc.), and install a specific version, run:
Expand Down
2 changes: 1 addition & 1 deletion cmd/modern/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (c *Root) addGlobalFlags() {
String: &c.configFilename,
DefaultString: config.DefaultFileName(),
Name: "sqlconfig",
Usage: localizer.Sprintf("configuration file"),
Usage: localizer.Sprintf("configuration file (YAML format, use .yaml or .yml extension)"),
})

/* BUG(stuartpa): - At the moment this is a top level flag, but it doesn't
Expand Down
9 changes: 8 additions & 1 deletion internal/translations/locales/de-DE/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/en-US/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3741,4 +3748,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/es-ES/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/fr-FR/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/it-IT/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/ja-JP/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/ko-KR/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/pt-BR/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/ru-RU/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/zh-CN/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
9 changes: 8 additions & 1 deletion internal/translations/locales/zh-TW/out.gotext.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "configuration file (YAML format, use .yaml or .yml extension)",
"message": "configuration file (YAML format, use .yaml or .yml extension)",
"translation": "configuration file (YAML format, use .yaml or .yml extension)",
"translatorComment": "Copied from source.",
"fuzzy": true
},
{
"id": "log level, error=0, warn=1, info=2, debug=3, trace=4",
"message": "log level, error=0, warn=1, info=2, debug=3, trace=4",
Expand Down Expand Up @@ -3737,4 +3744,4 @@
"fuzzy": true
}
]
}
}
Loading