diff options
| author | Teddy Wing | 2021-08-25 00:11:13 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-08-25 00:11:13 +0200 |
| commit | ff00a3c613570c5460a420c5882da41ed2e09142 (patch) | |
| tree | 7389143219ce46599698e2678cac96de5ce3630c | |
| parent | ee898b113f54911e9e2719c3f6b73dcf42139a0e (diff) | |
| download | readline-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.
| -rw-r--r-- | incdec | 3 | ||||
| -rw-r--r-- | incdec-bindings.bash | 20 | ||||
| -rw-r--r-- | incdec.m4.bash | 3 |
3 files changed, 20 insertions, 6 deletions
@@ -102,6 +102,3 @@ function __readline_incdec_decrement { READLINE_POINT="$(($READLINE_POINT + 1))" fi } - -bind -x '"\C-xx": __readline_incdec_decrement' -bind -x '"\C-xa": __readline_incdec_increment' 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' diff --git a/incdec.m4.bash b/incdec.m4.bash index f7930cf..388b773 100644 --- a/incdec.m4.bash +++ b/incdec.m4.bash @@ -61,6 +61,3 @@ function __readline_incdec_decrement { READLINE_POINT="$(($READLINE_POINT + 1))" fi } - -bind -x '"\C-xx": __readline_incdec_decrement' -bind -x '"\C-xa": __readline_incdec_increment' |
