aboutsummaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-12-15 16:29:37 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-12-15 16:29:37 +1300
commitb3043d3e52fdb13127bda5aa89b5c57eefbbace9 (patch)
treec25624a6ee232d1c43c9c5dc480f414dca08bbda /readline
parentMake short-circuits a bit more explicit (diff)
downloaddotfiles-b3043d3e52fdb13127bda5aa89b5c57eefbbace9.tar.gz
dotfiles-b3043d3e52fdb13127bda5aa89b5c57eefbbace9.zip
Shortcut to wrap a line in a function
Diffstat (limited to 'readline')
-rw-r--r--readline/inputrc3
1 files changed, 3 insertions, 0 deletions
diff --git a/readline/inputrc b/readline/inputrc
index 7396e320..396eb28b 100644
--- a/readline/inputrc
+++ b/readline/inputrc
@@ -41,6 +41,9 @@ $if Bash
"\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 ; ...)