go-script-bash icon indicating copy to clipboard operation
go-script-bash copied to clipboard

Add `subcommand` module with `@go.subcommand_select` function

Open mbland opened this issue 8 years ago • 0 comments

The first implementation of demo-core (#57) will provide a list of available subcommands whenever it's actually executed, rather than one of its subcommands. When the argument list is empty, it's not an error; when it isn't empty, a subcommand wasn't found, hence it is an error.

The next iteration will include a select statement-based interface that will prompt the user to select a subcommand whenever the standard input (file descriptor zero) is a terminal. Since this behavior seems like it could be generally useful, I'll implement it as a module function.

mbland avatar Dec 24 '16 18:12 mbland