From 625fddf396d00b5523a23eb012789c55a801026a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 23 Apr 2016 16:10:46 +1200 Subject: Reorganise/correct readline bindings --- readline/inputrc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'readline/inputrc') diff --git a/readline/inputrc b/readline/inputrc index 7d86b255..2b13c943 100644 --- a/readline/inputrc +++ b/readline/inputrc @@ -30,30 +30,35 @@ set skip-completed-text On # Bash macros $if Bash + # Expand ! history with a spacebar press Space: magic-space + # Alt-E (for exec) to prepend "exec " to a command and return to the end of # the line "\ee": "\C-aexec \C-e" + # Alt-P (for procedure) to wrap current command in () { ... ; } and go to + # the start of the line + "\ep": "\C-a() { \C-e ; }\C-a" + # Alt-S (for set) to wrap current command in (set -x ; ...) + "\es": "\C-a(set -x ; \C-e)\C-b" + # Alt-H (for home) to go $HOME "\eh": "\C-ucd\C-j\C-y" # Alt-L (for ls) to run ls -Al "\el": "\C-uls -Al\C-j\C-y" # Alt-M (for muxer) to run tmux "\em": "\C-utmux\C-j\C-y" - # Alt-P (for procedure) to wrap current command in () { ... ; } and go to - # the start of the line - "\ep": "\C-a() { \C-e ; }\C-a" # Alt-R (for repeat) to run the previous command in history again "\er": "\C-u\C-p\C-j\C-y" - # Alt-S (for set) to wrap current command in (set -x ; ...) - "\es": "\C-a(set -x ; \C-e)\C-b" # Alt-T (for todo) to edit my to-do file with td(1) "\et": "\C-atd\C-j\C-y" - # Ctrl-Alt-W to delete a previous shell-quoted word - "\e\C-w": shell-backward-kill-word + # Ctrl-Alt-B to move backward a shell-quoted word - "\e\C-f": shell-forward-word - # Ctrl-Alt-F to move forward a shell-quoted word "\e\C-b": shell-backward-word + # Ctrl-Alt-F to move forward a shell-quoted word + "\e\C-f": shell-forward-word + # Ctrl-Alt-W to delete a previous shell-quoted word + "\e\C-w": shell-backward-kill-word + $endif -- cgit v1.2.3