[Opensrf-commits] r1826 - trunk/src/srfsh (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Oct 25 17:44:32 EDT 2009
Author: dbs
Date: 2009-10-25 17:44:26 -0400 (Sun, 25 Oct 2009)
New Revision: 1826
Modified:
trunk/src/srfsh/srfsh.c
Log:
Improve the 'help' output for srfsh:
* Document the method-name parameter for the introspect command
* Document the currently supported srfsh variables
* Reorganize the help slightly to place more emphasis on
introspect and request and cut down on some of the blank lines.
Modified: trunk/src/srfsh/srfsh.c
===================================================================
--- trunk/src/srfsh/srfsh.c 2009-10-25 17:02:06 UTC (rev 1825)
+++ trunk/src/srfsh/srfsh.c 2009-10-25 21:44:26 UTC (rev 1826)
@@ -975,7 +975,7 @@
fputs(
"---------------------------------------------------------------------------------\n"
- "Commands:\n"
+ "General commands:\n"
"---------------------------------------------------------------------------------\n"
"help - Display this message\n"
"!<command> [args] - Forks and runs the given command in the shell\n"
@@ -983,41 +983,51 @@
"time - Prints the current time\n"
"time <timestamp> - Formats seconds since epoch into readable format\n"
*/
- "set <variable> <value> - set a srfsh variable (e.g. set pretty_print true )\n"
+ "set <variable> <value> - Set a srfsh variable (e.g. set pretty_print true )\n"
"print <variable> - Displays the value of a srfsh variable\n"
+ "\n"
"---------------------------------------------------------------------------------\n"
-
- "router query servers <server1 [, server2, ...]>\n"
- " - Returns stats on connected services\n"
+ "Variables:\n"
+ "---------------------------------------------------------------------------------\n"
+ "pretty_print - Display nicely formatted JSON results\n"
+ " - Accepted values: true, false\n"
+ " - Default value: true\n"
"\n"
+ "raw_print - Pass JSON results through 'less' paging command\n"
+ " - Accepted values: true, false\n"
+ " - Default value: false\n"
"\n"
- "request <service> <method> [ <json formatted string of params> ]\n"
- " - Anything passed in will be wrapped in a json array,\n"
+ "---------------------------------------------------------------------------------\n"
+ "Commands for OpenSRF services and methods:\n"
+ "---------------------------------------------------------------------------------\n"
+ "introspect <service> [\"method-name\"]\n"
+ " - Prints service API, limited to the methods that match the optional\n"
+ " right-truncated method-name parameter\n"
+ "\n"
+ "request <service> <method> [ <JSON formatted string of params> ]\n"
+ " - Anything passed in will be wrapped in a JSON array,\n"
" so add commas if there is more than one param\n"
"\n"
+ "router query servers <server1 [, server2, ...]>\n"
+ " - Returns stats on connected services\n"
"\n"
"relay <service> <method>\n"
" - Performs the requested query using the last received result as the param\n"
"\n"
- "\n"
"math_bench <num_batches> [0|1|2]\n"
" - 0 means don't reconnect, 1 means reconnect after each batch of 4, and\n"
" 2 means reconnect after every request\n"
"\n"
- "introspect <service>\n"
- " - prints the API for the service\n"
- "\n"
- "\n"
"---------------------------------------------------------------------------------\n"
- " Commands for Open-ILS\n"
+ " Commands for Evergreen\n"
"---------------------------------------------------------------------------------\n"
"login <username> <password> [type] [org_unit] [workstation]\n"
" - Logs into the 'server' and displays the session id\n"
" - To view the session id later, enter: print login\n"
"---------------------------------------------------------------------------------\n"
"\n"
- "\n"
- "Note: long output is piped through 'less'. To search in 'less', type: /<search>\n"
+ "Note: long output is piped through 'less' when the 'raw_print' variable is true.\n"
+ "To search in 'less', type: /<search>\n"
"---------------------------------------------------------------------------------\n"
"\n",
stdout );
More information about the opensrf-commits
mailing list