I do something similar for some of my interactive tools and ended up
writing this: https://github.com/gobs/args.
If interested the command parser is here: https://github.com/gobs/cmd.
-- Raffaele
On Mon, Apr 20, 2020 at 10:23 AM Kurtis Rader wrote:
>
> os.Args simply exposes the arguments passed
os.Args simply exposes the arguments passed to the program by the operating
system. On UNIX this is typically called "argv" in C/C++ programs. The
parsing of those strings into two arguments is done by the shell that runs
your elvish program. It is not done by os.Args. I'm not aware of any
function
Hi,
I'm working on a program which will have a prompt to enter commands like:
add "foo bar"
I need what os.Args provides but on custom input so to above input I would
like to get:
[]string{"add", "foo bar"}
Package os uses runtime_args(), and it isn't exported nor accepts input.
Any id