123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990(*---------------------------------------------------------------------------
Copyright (c) 2020 The b0 programmers. All rights reserved.
Distributed under the ISC license, see terms at the end of the file.
---------------------------------------------------------------------------*)openB0_stdopenResult.Syntaxleteditcletsc=B0_b0.Def.edit(moduleB0_pack)ccletsletgetformatkcletsc=B0_b0.Def.get_meta_key(moduleB0_pack)cformatkcletsletlistformatcletsc=B0_b0.Def.list(moduleB0_pack)cformatcletsletshowformatcsc=letformat=ifformat=`Normalthen`LongelseformatinB0_b0.Def.list(moduleB0_pack)cformatcs(* Command line interface *)openCmdlinerletpacks~right:r=letdoc="The $(docv) to act on. All of them if unspecified."inArg.(value&pos_rightrstring[]&info[]~doc~docv:"CMDLET")letpacks_all=packs~right:(-1)letlist_term=Term.(constlist$B0_b0.Cli.format$packs_all)(* Commands *)letedit=letdoc="Edit build packs"inletdescr=`P"$(tname) opens in your editor the B0 files of given \
build packs are defined."inletenvs=B0_b0.Cli.editor_envsinletterm=Term.(constedit$packs_all)inB0_b0.Cli.subcmd_with_b0_file"edit"~doc~descr~envstermletget=letdoc="Get build pack metadata"inletdescr=`P"$(tname) outputs the value of metadata $(i,KEY) of given \
build packs."inletenvs=B0_b0.Cli.pager_envsinletpacks=packs~right:0inletterm=Term.(constget$B0_b0.Cli.format$B0_b0.Cli.pos_key$packs)inB0_b0.Cli.subcmd_with_b0_file"get"~doc~descr~envstermletlist=letdoc="List build packs (default command)"inletdescr=`P"$(tname) lists given build packs."inletenvs=B0_b0.Cli.pager_envsinB0_b0.Cli.subcmd_with_b0_file"list"~doc~descr~envslist_termletshow=letdoc="Show build pack metadata."inletdescr=`P"$(tname) is $(b,list -l), it outputs metadata of given \
build packs."inletenvs=B0_b0.Cli.pager_envsinletterm=Term.(constshow$B0_b0.Cli.format$packs_all)inB0_b0.Cli.subcmd_with_b0_file"show"~doc~descr~envstermletsubs=[edit;get;list;show]letcmd=letdoc="Operate on build packs"inletdescr=`P"$(tname) operates on build packs. The default command is \
$(tname) $(b,list)."inletenvs=B0_b0.Cli.pager_envsanddefault=list_terminB0_b0.Cli.cmd_group_with_b0_file"pack"~doc~descr~envs~defaultsubs(*---------------------------------------------------------------------------
Copyright (c) 2020 The b0 programmers
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------------------------*)