[Routes] add format flag to rails routes

Hello, everyone! In my team we have few rails application. And sometimes my collegues from another team ask me to give them list of the routes.

And standard output not every time is great. We have long urls, and on small terminals it doesn’t readable at all.

Or some other reason when it will be wonderful, when you can set output format.

I saw PR related to this problem, that adding expanded mode like in postgres.

But I think it still doesn’t fix the problem the right way.

I thought about flag where you can set the format of output - set certain columns that need to print.

Something like - rails routes --columns=pvua

Where p - prefix, v - verb, u - uri, a - action.

And you can specify output without prefix and action. Or change the order.

I made that in a fork, but reading the contributing rules, I started hesitate about should I make a PR, may be it is just useless cosmetic patch.

What do you think about that?

That there is no delimiter means that awk can’t identify the prefix column when there’s no prefix. If there was a delimiter, using awk to filter would do the trick.

Is it for or against? ) Or you propose to add delimiter?