aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-08-24 21:03:37 +0200
committerTeddy Wing2021-08-24 21:24:11 +0200
commit3865ae0be693bf32278a05ce661724ce4c382b24 (patch)
treeb7c93ad04d5fbfcbb38aa3ee45e4802c5c529cb0
parent067086adff7134f970a141269856f65ef195f2db (diff)
downloadreadline-incdec-3865ae0be693bf32278a05ce661724ce4c382b24.tar.bz2
incdec: Change default bindings to `C-x a` and `C-x x`
I had used `C-x +` and `C-x -` during testing because I had an existing non-"-x" binding that was prefixed with `C-x a`, and when I tried to add the `C-x a` "-x" binding, it caused the following error: bash_execute_unix_command: cannot find keymap for command Switch the default bindings to `C-x a` and `C-x x` because those are the ones I originally wanted, since they don't appear to conflict with any existing default Readline bindings, and they're similar to the Vim increment and decrement commands.
-rw-r--r--incdec4
-rw-r--r--incdec.m4.bash4
2 files changed, 4 insertions, 4 deletions
diff --git a/incdec b/incdec
index 671dff3..a1cf64d 100644
--- a/incdec
+++ b/incdec
@@ -85,5 +85,5 @@ function __readline_incdec_decrement {
fi
}
-bind -x '"\C-x-": __readline_incdec_decrement'
-bind -x '"\C-x+": __readline_incdec_increment'
+bind -x '"\C-xx": __readline_incdec_decrement'
+bind -x '"\C-xa": __readline_incdec_increment'
diff --git a/incdec.m4.bash b/incdec.m4.bash
index 0ec0f51..974fe7a 100644
--- a/incdec.m4.bash
+++ b/incdec.m4.bash
@@ -44,5 +44,5 @@ function __readline_incdec_decrement {
fi
}
-bind -x '"\C-x-": __readline_incdec_decrement'
-bind -x '"\C-x+": __readline_incdec_increment'
+bind -x '"\C-xx": __readline_incdec_decrement'
+bind -x '"\C-xa": __readline_incdec_increment'