@@ -25,7 +25,7 @@ type Root struct {
25
25
// It also provides usage examples for sqlcmd.
26
26
func (c * Root ) DefineCommand (... cmdparser.CommandOptions ) {
27
27
// Example usage steps
28
- steps := []string {"sqlcmd create mssql --using https://aka.ms/AdventureWorksLT.bak" }
28
+ steps := []string {"sqlcmd create mssql --accept-eula -- using https://aka.ms/AdventureWorksLT.bak" }
29
29
30
30
if runtime .GOOS == "windows" {
31
31
steps = append (steps , "sqlcmd open ads" )
@@ -39,8 +39,11 @@ func (c *Root) DefineCommand(...cmdparser.CommandOptions) {
39
39
Steps : steps }}
40
40
41
41
commandOptions := cmdparser.CommandOptions {
42
- Use : "sqlcmd" ,
43
- Short : "sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools" ,
42
+ Use : "sqlcmd" ,
43
+ Short : `sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools
44
+
45
+ Feedback:
46
+ https://github.com/microsoft/go-sqlcmd/issues/new` ,
44
47
SubCommands : c .SubCommands (),
45
48
Examples : examples ,
46
49
}
@@ -86,6 +89,18 @@ func (c *Root) IsValidSubCommand(command string) bool {
86
89
}
87
90
88
91
func (c * Root ) addGlobalFlags () {
92
+
93
+ // BUG:(stuartpa) - This is a temporary flag until we have migrated
94
+ // the kong impl to cobra. sqlcmd -? will show the kong help (all the back-compat
95
+ // flags), sqlcmd --? will show the kong "did you mean one of" help.
96
+ var unused bool
97
+ c .AddFlag (cmdparser.FlagOptions {
98
+ Bool : & unused ,
99
+ Name : "?" ,
100
+ Shorthand : "?" ,
101
+ Usage : "help for backwards compatibility flags (-S, -U, -E etc.)" ,
102
+ })
103
+
89
104
c .AddFlag (cmdparser.FlagOptions {
90
105
String : & c .configFilename ,
91
106
DefaultString : config .DefaultFileName (),
0 commit comments