diff docs/source/capabilities.rst @ 279:3c5fa8ed4f8b

improving help
author catherine@Elli.myhome.westell.com
date Thu, 19 Mar 2009 10:15:02 -0400
parents f0f293d83337
children 8ea39093ddf2
line wrap: on
line diff
--- a/docs/source/capabilities.rst	Thu Mar 19 00:02:11 2009 -0400
+++ b/docs/source/capabilities.rst	Thu Mar 19 10:15:02 2009 -0400
@@ -3,12 +3,80 @@
 
 For the most part, SQLPython simply duplicates SQL\*Plus's capabilites.
 
+Neatened output
+===============
+
+When printing query results, sqlpython economizes on screen space by allocating
+only the width each column actually needs.
+
+Smart prompt
+============
+
+sqlpython automatically uses `username`@`instance`> as its prompt, helping
+avoid wrong-instance and wrong-user errors.
+
+Tab completion
+==============
+
+When typing SQL commands, hitting `<TAB>` after entering part of an object
+or column name brings up a list of appropriate possibilities or, if there
+is only one possibility, fills in the rest of the name.  This feature is
+not yet very reliable, but can save typing.
+
+Scripting
+=========
+
+Like SQL\*Plus, sqlpython can run scripts (text files with series of SQL and
+sqlpython commands) with `@/path/to/script.sql` or (for online scripts)
+`@http://scripthost/scriptlibrary/script.sql`.
+
+History
+=======
+
+The up- and down-arrow keys allow you to scroll through the lines entered so far
+in your sqlpython session.
+
+Commands are also entered into a command history.
+
+  `history` or `hi`
+    List entire command history
+
+  `list` or `li`
+    List only last command
+
+  `hi <N>`
+    List command number <N> from history.  
+
+  `hi <N>-`, `hi -<N>`
+    List commands from <N> onward, or up to <N>
+
+  `hi <str>`
+    Lists commands that include the string <str>
+
+  `hi /<regex>/` 
+    Lists commands that match the regular expression <regex>
+
+  `run`, `r`, or `\\g`
+    Run the most recent command again
+
+  `run <N>`
+    Run command <N>
+
+  `run <str>`, `run /<regex>/`
+    Run command matching <str> or <regex> (as for `history`) - 
+    if multiple items would match, run most recent
+
 UNIX-like commands
 ==================
 
+Many sqlpython commands allow you to act as though the database objects
+were files in a UNIX filesystem.  Many of the commands also accept flags
+to modify their behavior.
+
 ls
-   Lists objects from the data dictionaries.  There are implied wildcards at the beginning and
-   end
+   Lists objects from the data dictionaries, as though they were in a 
+   *object_type*/*object_name* directory structure.  Thus, `ls view/`
+   lists all the user's views.
 
 cat
    Shorthand for "SELECT * FROM"
@@ -51,4 +119,4 @@
   SELECT 
 
 Wild SQL can only be used in the primary column list of straightforward SELECT statements, 
-not in subqueries, `UNION`ed queries, etc.
\ No newline at end of file
+not in subqueries, `UNION`ed queries, etc.