myaws icon indicating copy to clipboard operation
myaws copied to clipboard

--fields doesn't work as intended

Open heydonovan opened this issue 2 years ago • 1 comments

$ myaws version
0.4.8
$ myaws ec2 ls --help
List EC2 instances

Usage:
  myaws ec2 ls [flags]

Flags:
  -a, --all                 List all instances (by default, list running instances only)
  -F, --fields string       Output fields list separated by space (default "InstanceId InstanceType PublicIpAddress PrivateIpAddress AvailabilityZone StateName LaunchTime Tag:Name")
$ myaws ec2 ls --region us-east-1 -F 'InstanceId InstanceType PublicIpAddress PrivateIpAddress AvailabilityZone StateName LaunchTime Tag:Name'
i-123
i-456
...

Using the -F option doesn't work. It only shows InstanceId. Can confirm the options are indeed separated by a space. I thought I had the flag syntax incorrect, so I tried multiple -F flags. No bueno either.

$ myaws ec2 ls --region us-east-1 -F 'InstanceId' -F 'InstanceType'
m5.large
t3.medium
...

heydonovan avatar Nov 01 '22 18:11 heydonovan

Thank you for reporting this, but I cannot reproduce the issue. It looks work fine to me. The -F option takes a list of fields separated by space.

minamijoyo avatar Nov 02 '22 07:11 minamijoyo