-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
TL;DR
I want to iterate over all contexts I have set up in hcloud. Unfortunately hcloud context list does not support JSON output:
server ~ # hcloud context list -o json
hcloud: invalid output option: json
So in the past I improvised by parsing the normal output:
server ~ # hcloud context list --output noheader -o columns=name | head -n1
Hosting
This worked fine in hcloud 1.43:
server ~ # hcloud-1.43.1 context list --output noheader -o columns=name | head -n1 | cat -A
Hosting$
But with hcloud 1.61 the output is now padded with spaces, which broke my parsing:
server ~ # hcloud-1.61.0 context list --output noheader -o columns=name | head -n1 | cat -A
Hosting $
I think JSON output would be the sensible solution here.
Expected behavior
I want cleanly parseable output that doesn't break when the human-readable output format is changed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels