@@ -357,9 +357,10 @@ func (c *Commando) complete(ctx *cli.Context, args []string) []string {
357357	// 
358358	// aliyun 
359359	if  len (args ) ==  0  {
360+ 		// Case insensitive strings.ToLower() 
360361		ctx .Command ().ExecuteComplete (ctx , args )
361362		for  _ , p  :=  range  c .library .GetProducts () {
362- 			if  ! strings .HasPrefix (p .GetLowerCode (), ctx .Completion ().Current ) {
363+ 			if  ! strings .HasPrefix (p .GetLowerCode (), strings . ToLower ( ctx .Completion ().Current ) ) {
363364				continue 
364365			}
365366			cli .PrintfWithColor (w , cli .ProductListColor (), "%s\n " , p .GetLowerCode ())
@@ -375,7 +376,7 @@ func (c *Commando) complete(ctx *cli.Context, args []string) []string {
375376	if  product .ApiStyle  ==  "rpc"  {
376377		if  len (args ) ==  1  {
377378			for  _ , name  :=  range  product .ApiNames  {
378- 				if  ! strings .HasPrefix (name ,  ctx .Completion ().Current ) {
379+ 				if  ! strings .HasPrefix (strings . ToLower ( name ),  strings . ToLower ( ctx .Completion ().Current ) ) {
379380					continue 
380381				}
381382				cli .PrintfWithColor (w , cli .APIListColor (), "%s\n " , name )
@@ -388,7 +389,7 @@ func (c *Commando) complete(ctx *cli.Context, args []string) []string {
388389		}
389390
390391		api .ForeachParameters (func (s  string , p  meta.Parameter ) {
391- 			if  strings .HasPrefix ("--" + s ,  ctx .Completion ().Current ) &&  ! p .Hidden  {
392+ 			if  strings .HasPrefix ("--" + strings . ToLower ( s ),  strings . ToLower ( ctx .Completion ().Current ) ) &&  ! p .Hidden  {
392393				cli .Printf (ctx .Writer (), "--%s\n " , s )
393394			}
394395		})
0 commit comments