blob: e1232b795b1831e05ed9e3cf346ce803902d34ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
Readline Incdec
===============
Readline bindings to increment and decrement numbers on the command line.
## Demo
The commands increment or decrement the closest number to the left of point. If
point is to the left of the first number in the line, the first number is
modified.

## Bindings
Default bindings are provided, but they can also be customised by adding them
manually. By default:
| Binding | Action |
|---------|-----------|
| `C-x a` | Increment |
| `C-x x` | Decrement |
## Install
TODO
source /path/to/incdec.bash
To enable the default bindings, also add:
source /path/to/incdec-bindings.bash
bind -x '"\C-x-": __readline_incdec_decrement'
bind -x '"\C-x+": __readline_incdec_increment'
## License
Copyright © 2021 Teddy Wing. Licensed under the GNU GPLv3+ (see the included
COPYING file).
|