bash-my-aws / bash-my-aws

Bash-my-AWS provides simple but powerful CLI commands for managing AWS resources

Home Page:https://bash-my-aws.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource listing functions should show nothing if nothing piped in

mbailey opened this issue · comments

$ instances nothing_found | instance-vpc | vpcs

This is tricky. How does a function know the difference between some "nothing" being piped in and there being no pipe involved?

I found this thread of solutions worth reading.

Could we simply check for args, if none, use a grep . to check for stdin and if neither, then show nothing?