@@ -25,7 +25,7 @@ type Root struct {
2525// It also provides usage examples for sqlcmd.
2626func (c * Root ) DefineCommand (... cmdparser.CommandOptions ) {
2727 // 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" }
2929
3030 if runtime .GOOS == "windows" {
3131 steps = append (steps , "sqlcmd open ads" )
@@ -39,8 +39,11 @@ func (c *Root) DefineCommand(...cmdparser.CommandOptions) {
3939 Steps : steps }}
4040
4141 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` ,
4447 SubCommands : c .SubCommands (),
4548 Examples : examples ,
4649 }
@@ -86,6 +89,18 @@ func (c *Root) IsValidSubCommand(command string) bool {
8689}
8790
8891func (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+
89104 c .AddFlag (cmdparser.FlagOptions {
90105 String : & c .configFilename ,
91106 DefaultString : config .DefaultFileName (),
0 commit comments