From 42205220dd9b1ecdf9749f4c09e6c8b742667a6d Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Fri, 30 Dec 2016 00:52:54 -0500 Subject: [PATCH] prompt: Move the keybindings section to the header This is part of a longer series of commit to expand the documentation. --- lib/awful/prompt.lua | 62 ++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/lib/awful/prompt.lua b/lib/awful/prompt.lua index 65c36f48..2bf837e9 100644 --- a/lib/awful/prompt.lua +++ b/lib/awful/prompt.lua @@ -1,6 +1,45 @@ --------------------------------------------------------------------------- --- Prompt module for awful. -- +-- **Keyboard navigation**: +-- +-- The following readline keyboard shortcuts are implemented as expected: +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +-- +--
NameUsage
CTRL+Abeginning-of-line
CTRL+Bbackward-char
CTRL+Ccancel
CTRL+Ddelete-char
CTRL+Eend-of-line
CTRL+Jaccept-line
CTRL+Maccept-line
CTRL+Fmove-cursor-right
CTRL+Hbackward-delete-char
CTRL+Kkill-line
CTRL+Uunix-line-discard
CTRL+Wunix-word-rubout
CTRL+BACKSPACEunix-word-rubout
SHIFT+INSERTpaste
HOMEbeginning-of-line
ENDend-of-line
+-- +-- The following shortcuts implement additional history manipulation commands +-- where the search term is defined as the substring of the command from first +-- character to cursor position. +-- +-- * CTRL+R: reverse history search, matches any history entry +-- containing search term. +-- * CTRL+S: forward history search, matches any history entry +-- containing search term. +-- * CTRL+UP: ZSH up line or search, matches any history entry +-- starting with search term. +-- * CTRL+DOWN: ZSH down line or search, matches any history +-- entry starting with search term. +-- * CTRL+DELETE: delete the currently visible history entry from +-- history file. This does not delete new commands or history entries under +-- user editing. +-- -- **Basic usage**: -- -- By default, `rc.lua` will create one `awful.widget.prompt` per screen called @@ -214,29 +253,6 @@ end --- Run a prompt in a box. -- --- The following readline keyboard shortcuts are implemented as expected: --- CTRL+A, CTRL+B, CTRL+C, CTRL+D, --- CTRL+E, CTRL+J, CTRL+M, CTRL+F, --- CTRL+H, CTRL+K, CTRL+U, CTRL+W, --- CTRL+BACKSPACE, SHIFT+INSERT, HOME, --- END and arrow keys. --- --- The following shortcuts implement additional history manipulation commands --- where the search term is defined as the substring of the command from first --- character to cursor position. --- --- * CTRL+R: reverse history search, matches any history entry --- containing search term. --- * CTRL+S: forward history search, matches any history entry --- containing search term. --- * CTRL+UP: ZSH up line or search, matches any history entry --- starting with search term. --- * CTRL+DOWN: ZSH down line or search, matches any history --- entry starting with search term. --- * CTRL+DELETE: delete the currently visible history entry from --- history file. This does not delete new commands or history entries under --- user editing. --- -- @tparam[opt={}] table args A table with optional arguments -- @tparam[opt] gears.color args.fg_cursor -- @tparam[opt] gears.color args.bg_cursor