podmanSpec top-level property
Completion spec for podman CLI
Implementation
final FigSpec podmanSpec = FigSpec(
name: 'podman',
description: 'Manage containers, pods, and images with Podman',
subcommands: [
sharedCommands['attach']!,
sharedCommands['build']!,
sharedCommands['commit']!,
sharedCommands['cp']!,
sharedCommands['create']!,
sharedCommands['diff']!,
Subcommand(
name: 'events',
description: 'Show podman system events',
options: [
Option(
args: [Arg(name: 'filter')],
description: 'Filter output based on conditions provided',
name: ['-f', '--filter']),
Option(
args: [Arg(name: 'string')],
description: 'Format the output using the given Go template',
name: '--format'),
Option(
args: [Arg(name: 'string')],
description: 'Show all events created since timestamp',
name: '--since'),
Option(
args: [Arg(name: 'string')],
description: 'Stream events until this timestamp',
name: '--until')
]),
sharedCommands['exec']!,
sharedCommands['export']!,
sharedCommands['history']!,
sharedCommands['imageList']!,
sharedCommands['imageImport']!,
Subcommand(
name: 'info',
description: 'Display podman system information',
options: [
Option(
args: [Arg(name: 'string')],
description: 'Format the output using the given Go template',
name: ['-f', '--format'])
]),
Subcommand(
name: 'inspect',
description: 'Display the configuration of object denoted by ID',
args: [
Arg(name: 'Name or ID', generators: [
Generator(
script: ['podman', 'ps', '-a', '--format', '{{ json . }}'],
// TS_UNCONVERTED_START (postProcess)
// function (out) {
// const allLines = out.split("\n").map((line) => JSON.parse(line));
// return allLines.map((i) => ({
// name: i.Id,
// displayName: `[con] ${i.Id} (${i.Image})`,
// }));
// TS_UNCONVERTED_END
postProcess: null),
Generator(
script: [
'podman',
'images',
'-a',
'--format',
'{{ json . }}'
],
// TS_UNCONVERTED_START (postProcess)
// function (out) {
// const allLines = out.split("\n").map((line) => JSON.parse(line));
// return allLines.map((i) => {
// let displayName;
// if (i.repository === "\u003cnone\u003e") {
// displayName = i.Id;
// } else {
// displayName = i.repository;
// if (i.Tag !== "\u003cnone\u003e") {
// displayName += `:${i.tag}`;
// }
// }
//
// return {
// name: i.ID,
// displayName: `[img] ${displayName}`,
// };
// }
// TS_UNCONVERTED_END
postProcess: null)
])
])
]);