dubeejw commented on a change in pull request #2326: Alphabetize listings in CLI
URL: 
https://github.com/apache/incubator-openwhisk/pull/2326#discussion_r132252831
 
 

 ##########
 File path: docs/actions.md
 ##########
 @@ -1022,13 +1022,37 @@ This command starts a polling loop that continuously 
checks for logs from activa
 
 ## Listing actions
 
-You can list all the actions that you have created using:
+You can list all the actions that you have created using `wsk action list`:
 
 ```
 wsk action list
+actions
+/guest/packageB/A                  private nodejs:6
+/guest/C                           private nodejs:6
+/guest/A                           private nodejs:6
+/guest/packageA/B                  private nodejs:6
+/guest/packageA/A                  private nodejs:6
+/guest/B                           private nodejs:6
 ```
 
-As you write more actions, this list gets longer and it can be helpful to 
group related actions into [packages](./packages.md). To filter your list of 
actions to just the those within a specific pacakge, you can use:
+Here, we see actions listed in order from most to least recently updated. For 
easier browsing, you can use the flag `--name-sort` or `-n` to sort a list 
alphabetically:
+
+```
+wsk action list --name-sort
+actions
+/guest/A                           private nodejs:6
+/guest/B                           private nodejs:6
+/guest/C                           private nodejs:6
+/guest/packageA/A                  private nodejs:6
+/guest/packageA/B                  private nodejs:6
+/guest/packageB/A                  private nodejs:6
+```
+
+Notice that the list is now sorted alphabetically by namespace, then package 
name, and finally action name, with the default package (no specified package) 
listed at the top.
+
+**Note**: The printed list is sorted alphabetically after it is received from 
the server. Other list flags such as `--limit` and `--skip` will be applied to 
the block of actions before they are received for sorting. To list actions in 
order by creation time, use the flag `--time`.
+
+As you write more actions, this list gets longer and it can be helpful to 
group related actions into [packages](./packages.md). To filter your list of 
actions to just the those within a specific package, you can use:
 
 Review comment:
   Drop `the` from `the those`.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to