From ee98ecc7bb553155399172ae8e4b30be881f1a7f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 11 Oct 2020 15:45:07 -0400 Subject: [PATCH] document save_history command and a few more small tweaks --- doc/src/Tools.rst | 8 ++++++-- tools/lammps-shell/README | 4 ++++ tools/lammps-shell/lammps-shell.cpp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 6ecb29d2e5..664c1a9772 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -500,6 +500,10 @@ regular LAMMPS commands: help (or ?) print a brief help message history display the current command history list clear_history wipe out the current command history list + save_history + write commands from the history to file. + The range is given as -, where and + may be empty. Example: save_history 100- in.recent source read commands from file (same as "include") pwd print current working directory cd change current working directory (same as pwd if no directory) @@ -534,8 +538,8 @@ Readline customization The behavior of the readline functionality can be customized in the ``${HOME}/.inputrc`` file. This can be used to alter the default settings or change the key-bindings. The LAMMPS Shell sets the -application name ``lammps-shell``, so customizations can be either -global or specific for the LAMMPS shell by bracketing them between +application name ``lammps-shell``, so settings can be either applied +globally or only for the LAMMPS shell by bracketing them between ``$if lammps-shell`` and ``$endif`` like in the following example: .. code-block:: bash diff --git a/tools/lammps-shell/README b/tools/lammps-shell/README index 1f5895b725..549f8a3343 100644 --- a/tools/lammps-shell/README +++ b/tools/lammps-shell/README @@ -88,6 +88,10 @@ regular LAMMPS commands: - help (or ?) print a brief help message - history display the current command history list - clear_history wipe out the current command history list +- save_history + write commands from the history to file. + The range is given as -, where and + may be empty. Example: save_history 100- in.recent - source read commands from file (same as "include") - pwd print current working directory - cd change current working directory (same as pwd if no directory) diff --git a/tools/lammps-shell/lammps-shell.cpp b/tools/lammps-shell/lammps-shell.cpp index 1f3c04570c..c01d342f6c 100644 --- a/tools/lammps-shell/lammps-shell.cpp +++ b/tools/lammps-shell/lammps-shell.cpp @@ -666,7 +666,7 @@ int main(int argc, char **argv) std::string trimmed; lammps_get_os_info(buf, buflen); - std::cout << "LAMMPS Shell version 1.0 OS: " << buf; + std::cout << "LAMMPS Shell version 1.1 OS: " << buf; if (!lammps_config_has_exceptions()) std::cout << "WARNING: LAMMPS was compiled without exceptions\n"