aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-07-25 16:35:25 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-07-25 16:35:25 +0300
commitdae93e6ab7ab75734bd1abd8abbd107579abbf5d (patch)
tree19dd2a9b532b34feb9a0d0a61b84e9a1fb253ace /doc
parent364f4246159b8d338c2fafc70b868ffc83816c2f (diff)
downloadgdbm-dae93e6ab7ab75734bd1abd8abbd107579abbf5d.tar.gz
gdbm-dae93e6ab7ab75734bd1abd8abbd107579abbf5d.tar.bz2
Improve the "next" shortcut.
* src/gdbmtool.c (open_handler): Close the previously opened database. (close_handler): Free the file name. (print_dir_handler): Print the number of buckets. (command_repeat_type): New enum. (command) <repeat>: Change type to enum command_repeat_type. (command_tab): Update accordingly. Mark "next" with REPEAT_NOARG. (run_last_command): Handle REPEAT_NOARG separately. * NEWS: Document the shortcut. * doc/gdbm.texi: Likewise. * src/debug.c (datbuf_format): Don't represent bytes after the end of datum as zeros. (gdbm_debug_datum): Print datum size.
Diffstat (limited to 'doc')
-rw-r--r--doc/gdbm.texi11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/gdbm.texi b/doc/gdbm.texi
index 7f93046..4eb8793 100644
--- a/doc/gdbm.texi
+++ b/doc/gdbm.texi
@@ -1923,8 +1923,8 @@ existing @acronym{GDBM} database or to create a new one.
@flindex junk.gdbm
When invoked without arguments, it tries to open a database file called
@file{junk.gdbm}, located in the current working directory. You can
-change this default by supplying the name of the database to use as
-an argument to the program, e.g.:
+change this default by supplying the name of the database as
+argument to the program, e.g.:
@example
$ gdbmtool file.db
@@ -2007,7 +2007,7 @@ command line options.
After successful startup, @command{gdbmtool} starts a loop, in which
it reads commands from the standard input, executes them and prints
-the results on the standard output. If the standard input is attached
+results on the standard output. If the standard input is attached
to a console, @command{gdbmtool} runs in interactive mode, which is
indicated by its @dfn{prompt}:
@@ -2384,6 +2384,11 @@ List the contents of the database.
Sequential access: fetch and display the next record. If the @var{key} is
given, the record following the one with this key will be fetched.
+Issuing several @code{next} commands in row is rather common. A
+shortcut is provided to facilitate such use: if the last entered
+command was @command{next}, hitting the @kbd{Enter} key repeats it
+without arguments.
+
See also @code{first}, above.
@xref{Sequential}, for more information on sequential access.

Return to:

Send suggestions and report system problems to the System administrator.