<feed xmlns='http://www.w3.org/2005/Atom'>
<title>readline-incdec/incdec.m4.bash, branch v0.0.2</title>
<subtitle>Readline bindings to increment and decrement numbers on the command line</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/'/>
<entry>
<title>Increase version v0.0.1 -&gt; v0.0.2</title>
<updated>2022-05-26T14:56:42+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-05-26T14:56:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=9aadce83d2318ba8e161cd4b8a7664f657df0915'/>
<id>9aadce83d2318ba8e161cd4b8a7664f657df0915</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2022-05-26T14:55:23+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2022-05-26T14:52:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=1cb9ad7286b87c348861dafd112a73901e4d6358'/>
<id>1cb9ad7286b87c348861dafd112a73901e4d6358</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>incdec.bash: Remove start position debug prints and TODO</title>
<updated>2021-08-28T22:51:44+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-28T22:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=685d35ca5ea0a976c670cd533533b03a68951c2d'/>
<id>685d35ca5ea0a976c670cd533533b03a68951c2d</id>
<content type='text'>
This works now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This works now.
</pre>
</div>
</content>
</entry>
<entry>
<title>incdec.bash: Set up point moving after start position</title>
<updated>2021-08-28T20:07:19+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-28T20:07:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=c8fa19d038ed79c640c5164735179611e95520d6'/>
<id>c8fa19d038ed79c640c5164735179611e95520d6</id>
<content type='text'>
This doesn't work yet as it turns out it requires a change to the
`incdec()` Perl subroutine.

We want to move point when switching between positive and negative
numbers (adding or removing a hypen negative sign), but only if point is
on or after the start of the number being incremented. If point is
before that, it looks like it's moving.

Read the start index from the `incdec()` subroutine and prefix it to the
output line in the format: "${start_position}#${output_line}". We can
then use the "#" to split the two values and extract them in the Bash
functions.

Needed to move setting `$READLINE_LINE` to the increment and decrement
Bash functions because I now run `__readline_incdec` in a subshell,
meaning the current line can't be manipulated with that variable in that
function.

In the increment and decrement Bash functions, we now check if the start
position of the incremented number is less than or equal to
`$READLINE_POINT` before trying to move point.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This doesn't work yet as it turns out it requires a change to the
`incdec()` Perl subroutine.

We want to move point when switching between positive and negative
numbers (adding or removing a hypen negative sign), but only if point is
on or after the start of the number being incremented. If point is
before that, it looks like it's moving.

Read the start index from the `incdec()` subroutine and prefix it to the
output line in the format: "${start_position}#${output_line}". We can
then use the "#" to split the two values and extract them in the Bash
functions.

Needed to move setting `$READLINE_LINE` to the increment and decrement
Bash functions because I now run `__readline_incdec` in a subshell,
meaning the current line can't be manipulated with that variable in that
function.

In the increment and decrement Bash functions, we now check if the start
position of the incremented number is less than or equal to
`$READLINE_POINT` before trying to move point.
</pre>
</div>
</content>
</entry>
<entry>
<title>incdec.bash: Add TODO about moving point</title>
<updated>2021-08-28T17:41:05+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-28T16:47:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=487e7220fe660e20b57f83edf0caf4b3ebdb2045'/>
<id>487e7220fe660e20b57f83edf0caf4b3ebdb2045</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a version number to included scripts</title>
<updated>2021-08-24T23:07:44+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-24T23:07:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=443e4ef5bf354477c0629197dd2b3e7dcc9ecf2e'/>
<id>443e4ef5bf354477c0629197dd2b3e7dcc9ecf2e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>incdec: Move bindings to a new file</title>
<updated>2021-08-24T22:11:13+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-24T22:11:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=ff00a3c613570c5460a420c5882da41ed2e09142'/>
<id>ff00a3c613570c5460a420c5882da41ed2e09142</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add license (GNU GPLv3+)</title>
<updated>2021-08-24T21:22:58+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-24T21:22:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=ee898b113f54911e9e2719c3f6b73dcf42139a0e'/>
<id>ee898b113f54911e9e2719c3f6b73dcf42139a0e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>incdec: Change default bindings to `C-x a` and `C-x x`</title>
<updated>2021-08-24T19:24:11+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-24T19:03:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=3865ae0be693bf32278a05ce661724ce4c382b24'/>
<id>3865ae0be693bf32278a05ce661724ce4c382b24</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>incdec: Add comments to describe Bash functions</title>
<updated>2021-08-24T18:38:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2021-08-24T18:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/readline-incdec/commit/?id=067086adff7134f970a141269856f65ef195f2db'/>
<id>067086adff7134f970a141269856f65ef195f2db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
