Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cli.Command{ Name: "which", Usage: "Show the full path of a command", Action: func(ctx context.Context, cmd *cli.Command) error { files := cmd.Args().Slice() if len(files) == 0 { return fmt.Errorf("missing command name") } for _, name := range files { path, err := findCommand(name) if err != nil { return fmt.Errorf("which: no %s in PATH", name) } fmt.Println(path) } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.