This commit is contained in:
2026-06-23 14:02:40 +02:00
parent 92ddf4f1f0
commit faa8c0fe26
2 changed files with 1 additions and 32 deletions

View File

@@ -28,7 +28,7 @@ import (
func Api(conf *cfg.Config) *cli.Command { func Api(conf *cfg.Config) *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "api", Name: "api",
Usage: "manage apiuments", Usage: "api access and documentation",
Commands: []*cli.Command{ Commands: []*cli.Command{
ApiList(conf), ApiList(conf),

View File

@@ -1,31 +0,0 @@
#!/bin/bash
getcommands() {
local command
command="$*"
if ! test "$command" = "help"; then
./esctl $command -h | sed -e '/^COMMANDS:/,/^$/!d;//d' -e 's/^ //' -e 's/[, ].*//' | sort
fi
}
printcommands() {
local indent basecommand commands command
indent="$1"
basecommand="$2"
commands="$3"
for command in $commands; do
echo "$indent" "$command"
commands=$(getcommands $basecommand $command)
if test -n "$commands"; then
printcommands "${indent} " "$basecommand $command" "$commands"
fi
done
}
commands=$(getcommands "")
printcommands "" "" "$commands"