secretname top-level property
Implementation
final FigGenerator secretname = FigGenerator(
script: [
'bash',
'-c',
'grep -o \'"name": *"[^"]*"\' \$HOME/.nextflow/secrets/store.json | grep -o \'"[^"]*"\$\' | tr -d \\"',
],
postProcess: (String output, [List<String>? tokens]) {
if (output.isEmpty) {
return <FigSuggestion>[];
}
return output
.split('\n')
.where((secretname) => secretname.trim().isNotEmpty)
.map((secretname) => FigSuggestion(
name: secretname.replaceAll('*', '').trim(),
description: 'Secret name',
icon: '🔒',
))
.toList();
},
);