Skip to content

Commit bda7808

Browse files
committed
delete default completion sub command
1 parent 45caad9 commit bda7808

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

cmd/internal/base/base.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ type Command struct {
5656
// Llcppg command
5757
var Llcppg = &Command{
5858
UsageLine: "llcppgx",
59-
Short: `llcppgx aims to be a tool for automatically generating LLGo bindings for C/C++ libraries,
60-
enhancing the experience of integrating LLGo with C!`,
59+
Short: `llcppgx aims to be a tool for automatically generating LLGo bindings for C/C++ libraries.`,
6160
// Commands initialized in package main
6261
}
6362

@@ -102,7 +101,9 @@ func (c *Command) Runnable() bool {
102101

103102
func RunCmdWithName(cmd *Command, args []string, name string, out *io.PipeWriter) {
104103
err := cmd.Flag.Parse(args)
105-
Check(err)
104+
if err != nil {
105+
return
106+
}
106107

107108
cfgFile := config.LLCPPG_CFG
108109

cmd/internal/gencfg/gencfg.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ func runCmd(cmd *base.Command, args []string) {
3030
name = cmd.Flag.Arg(0)
3131
}
3232

33+
if len(name) == 0 {
34+
return
35+
}
36+
3337
exts := strings.Fields(extsString)
3438
deps := strings.Fields(dependencies)
3539

cmd/internal/genpkg/genpkg.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ func init() {
2323

2424
func runCmd(cmd *base.Command, args []string) {
2525
err := cmd.Flag.Parse(args)
26-
base.Check(err)
26+
if err != nil {
27+
return
28+
}
2729

2830
cfgFile := config.LLCPPG_CFG
2931

cmd/llcppgx/completion_cmd.gox

Whitespace-only changes.

cmd/llcppgx/genpkg_cmd.gox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import (
22
self "github.com/goplus/llcppg/cmd/internal/genpkg"
33
)
44

5-
use "genpkg"
5+
use "genpkg [flags]"
66

77
short "generate a go package by signature information of symbols"
88

cmd/llcppgx/gensym_cmd.gox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import (
22
self "github.com/goplus/llcppg/cmd/internal/gensym"
33
)
44

5-
use "gensym"
5+
use "gensym [flags]"
66

77
short "generate symbol table for a C/C++ library"
88

cmd/llcppgx/init_cmd.gox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import (
22
self "github.com/goplus/llcppg/cmd/internal/gencfg"
33
)
44

5-
use "init"
5+
use "init [flags] [cpackage]"
66

77
short "init llcppg.cfg config file"
88

0 commit comments

Comments
 (0)