cmd

package
v0.0.0-...-752bcdd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App = &cli.App{
	Name:      "git-id",
	Usage:     "Stupid git identity management (list | switch <id>)",
	ArgsUsage: "git-id <identity>",
	Flags: []cli.Flag{

		flagConfig,
	},
	Commands: []*cli.Command{

		cmdClone,

		cmdWhoami,

		cmdAdd,
		cmdSet,
		cmdRemove,

		cmdRemote,
		cmdSetDefault,

		cmdHow,
	},
	Action: func(ctx *cli.Context) error {
		args := ctx.Args()
		switch args.Len() {
		default:
			return fmt.Errorf("expected 0 or 1 arguments")
		case 0:
			return cmdRoot(ctx)
		case 1:
			return cmdSwitch(ctx, args.First())
		}
	},
}

TODO: mention [-C] [-c, --config], putting it everywhere clutters

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL