microsoft / go-sqlcmd

The new sqlcmd, CLI for SQL Server and Azure SQL (winget install sqlcmd / sqlcmd create mssql / sqlcmd open ads)
https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility
MIT License
325 stars 57 forks source link

sqlcmd shouldn't show the full set of flags when the user doesn't provide an argument parameter #362

Closed shueybubbles closed 1 year ago

shueybubbles commented 1 year ago

EG ODBC


16:30:56.64 e:\git>sqlcmd -w
Sqlcmd: '-w': Missing argument. Enter '-?' for help.

And go-sqlcmd:

16:59:19.21 e:\git\go-sqlcmd>.\sqlcmd -w
Error: flag needs an argument: 'w' in -w
Usage:
   [flags]
<followed by every flag of which there are dozens>

The problem is it ends up scrolling the command prompt so far that I can't see what parameter I didn't provide.

Can we switch to only showing the full set of flags when the user passes -? , and giving a reminder to use -? when an argument is missing?