aboutsummaryrefslogtreecommitdiffstats
path: root/incdec-bindings.bash
diff options
context:
space:
mode:
authorTeddy Wing2021-08-25 00:11:13 +0200
committerTeddy Wing2021-08-25 00:11:13 +0200
commitff00a3c613570c5460a420c5882da41ed2e09142 (patch)
tree7389143219ce46599698e2678cac96de5ce3630c /incdec-bindings.bash
parentee898b113f54911e9e2719c3f6b73dcf42139a0e (diff)
downloadreadline-incdec-ff00a3c613570c5460a420c5882da41ed2e09142.tar.bz2
incdec: Move bindings to a new file
Split the bindings from the function definitions. This will allow users to source the functions and define their own bindings. The bindings file can be sourced to get the default bindings.
Diffstat (limited to 'incdec-bindings.bash')
-rw-r--r--incdec-bindings.bash20
1 files changed, 20 insertions, 0 deletions
diff --git a/incdec-bindings.bash b/incdec-bindings.bash
new file mode 100644
index 0000000..f86cb4d
--- /dev/null
+++ b/incdec-bindings.bash
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 Teddy Wing
+#
+# This file is part of Incdec.
+#
+# Incdec is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Incdec is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Incdec. If not, see <https://www.gnu.org/licenses/>.
+
+
+bind -x '"\C-xx": __readline_incdec_decrement'
+bind -x '"\C-xa": __readline_incdec_increment'