Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement option for sorting on a certain column on commands that output a tabular listing #991

Open
7ochem opened this issue Jun 15, 2018 · 0 comments

Comments

@7ochem
Copy link

7ochem commented Jun 15, 2018

It would be very useful to have sorting options on the commands that output listing in table format.

The sort option would need a column name as an argument to sort on and should also have to option to specify the direction (asc/desc).

As an example:

$ n98-magerun.phar dev:module:rewrite:list
+----------+--------------------------------+-------------------------------------------+
| Type     | Class                          | Rewrite                                   |
+----------+--------------------------------+-------------------------------------------+
| blocks   | adminhtml/notification_window  | AW_All_Block_Notification_Window          |
| blocks   | page/html_head                 | Mirasvit_Seo_Block_Html_Head              |
| blocks   | checkout/cart                  | Idev_OneStepCheckout_Block_Checkout_Cart  |
+----------+--------------------------------+-------------------------------------------+

I would like to do $ n98-magerun.phar dev:module:rewrite:list --sort=Class:

+----------+--------------------------------+-------------------------------------------+
| Type     | Class                        v | Rewrite                                   |
+----------+--------------------------------+-------------------------------------------+
| blocks   | adminhtml/notification_window  | AW_All_Block_Notification_Window          |
| blocks   | checkout/cart                  | Idev_OneStepCheckout_Block_Checkout_Cart  |
| blocks   | page/html_head                 | Mirasvit_Seo_Block_Html_Head              |
+----------+--------------------------------+-------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants