Open
Description
Similar to #306 where I would like to expand the fields outputted, it would be nice if there was an easy method to pass in additional json keys to every function.
For example...
✗ bma type instances
instances is a function
instances ()
{
local instance_ids=$(skim-stdin);
local filters=$(__bma_read_filters $@);
aws ec2 describe-instances ${instance_ids/#/'--instance-ids '} --output text --query "
Reservations[].Instances[][
InstanceId,
ImageId,
InstanceType,
State.Name,
[Tags[?Key=='Name'].Value][0][0],
LaunchTime,
Placement.AvailabilityZone,
VpcId $_bma_instances_expand_fields
]" | grep -E -- "$filters" | LC_ALL=C sort -b -k 6 | column -s' ' -t
}
$ _bma_instances_expand_fields=",NetworkInterfaces[0].PrivateIpAddresses[0].Association.PublicDnsName" \
instances ec2-snip.us-east-1.compute.amazonaws.com
i-snip ami-snip c3.xlarge running None 2021-01-20T22:38:20+00:00 us-east-1a vpc-snip ec2-snip.us-east-1.compute.amazonaws.com
Metadata
Metadata
Assignees
Labels
No labels