comparison doc/admin_guide.txt @ 8439:3bdae15252c6

feat: add support for ! history and readline command in roundup-admin Ad support to change input mode emacs/vi using new 'readline' roundup-admin command. Also bind keys to command/input strings, List numbered history and allow rerunning a command with !<number> or allow user to edit it using !<number>:p. admin_guide.txt: Added docs. admin.py: add functionality. Reconcile import commands to standard. Replace IOError with FileNotFoundError no that we have removed python 2.7 support. Add support for identifying backend used to supply line editing/history functions. Add support for saving commands sent on stdin to history to allow preloading of history. test_admin.py: Test code. Can't test mode changes as lack of pty when driving command line turns off line editing in readline/pyreadline3. Similarly can't test key bindings/settings. Some refactoring of test conditions that had to change because of additional output reporting backend library.
author John Rouillard <rouilj@ieee.org>
date Sun, 31 Aug 2025 16:54:17 -0400
parents 1a93dc58f975
children 0bb29d0509c9
comparison
equal deleted inserted replaced
8438:98e17dd0197f 8439:3bdae15252c6
2200 https://pythonhosted.org/pyreadline/usage.html#configuration-file. 2200 https://pythonhosted.org/pyreadline/usage.html#configuration-file.
2201 2201
2202 History is saved to the file ``.roundup_admin_history`` in your home 2202 History is saved to the file ``.roundup_admin_history`` in your home
2203 directory (for windows usually ``\Users\<username>``. 2203 directory (for windows usually ``\Users\<username>``.
2204 2204
2205 In Roundup 2.6.0 and newer, you can use the ``readline`` command to
2206 make changes on the fly.
2207
2208 * ``readline vi`` - change input mode to use vi key binding when
2209 editing. It starts in entry mode.
2210 * ``readline emacs`` - change input mode to emacs key bindings when
2211 editing. This is also the default.
2212 * ``readline reload`` - reloads the ``~/.roundup_admin_rlrc`` file so
2213 you can test and use changes.
2214 * ``readline history`` - dumps the history buffer and numbers all
2215 commands.
2216 * ``readline .inputrc_command_line`` can be used to make on the fly
2217 key and key sequence bindings to readline commands. It can also be
2218 used to change the internal readline settings using a set
2219 command. For example::
2220
2221 readline set bell-style none
2222
2223 will turn off a ``visible`` or ``audible`` bell. Single character
2224 keybindings::
2225
2226 readline Control-o: dump-variables
2227
2228 to list all the variables that can be set are supported. As are
2229 multi-character bindings::
2230
2231 readline "\C-o1": "commit"
2232
2233 will put "commit" on the input line when you type Control-o followed
2234 by 1. See the `readline manual for details
2235 <https://tiswww.cwru.edu/php/chet/readline/rluserman.html#Readline-Init-File-Syntax-1>`_
2236 on the command lines that can be used.
2237
2238 Also a limited form of ``!`` (bang) history reference was added. The
2239 reference must be at the start of the line. Typing ``!23`` will rerun
2240 command number 23 from your history.
2241
2242 Typing ``!23:p`` will load command 23 into the buffer so you can edit
2243 and submit it. Using the bang feature will append the command to the
2244 end of the history list.
2245
2246 Pyreadline3 users can use ``readline history`` and the
2247 bang commands (including ``:p``). Single character bindings can be
2248 done. For example::
2249
2250 readline Control-w: history-search-backward
2251
2252 The commands that are available are limited compared to Unix's
2253 readline or libedit. Setting variables or entry mode (emacs,
2254 vi) switching do not work in testing.
2255
2205 Using with the shell 2256 Using with the shell
2206 -------------------- 2257 --------------------
2207 2258
2208 With version 0.6.0 or newer of roundup (which introduced support for 2259 With version 0.6.0 or newer of roundup (which introduced support for
2209 multiple designators to display and the -d, -S and -s flags): 2260 multiple designators to display and the -d, -S and -s flags):

Roundup Issue Tracker: http://roundup-tracker.org/