Re: bug-bash Digest, Vol 232, Issue 27

2022-04-01 Thread Chet Ramey

On 3/31/22 4:44 PM, Jeremy Gurr wrote:

I have put together my own bash debugger (I like it better than the
others I've seen), and wanted to have variable name auto completion in
the 'read' built-in, just like it is in the base command line. Is
there a reason that bash uses a readline that is differently
configured in the 'read' builtin versus the full featured
autocompletion available in readline at the command line? Would this
be a difficult thing to implement?


The completion available to the `read' builtin is readline's default
completion, which is what's appropriate in the vast majority of cases.

The fix/enhancement is to add an option to `read', similar to `-e', so that
using it would result in `read' using bash's command line completion
mechanism instead of readline's default.

This is the second request for something like this, and I'm looking at it
for the next release after bash-5.2 (which is currently in alpha testing).

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: Bash-5.2-alpha available

2022-04-01 Thread Chet Ramey

On 3/31/22 12:40 PM, Andreas Schwab wrote:

On Mär 31 2022, Chet Ramey wrote:


So is this the scenario? If you have

echo 1
echo 2
echo 3
history

in your history, type ^P^P^P to get back to the `echo 2'. Add `24' to
the end, type ^A^F so the cursor is after the `e', then run
history-search-backward? Hit the `echo 1' and accept-line?


Yes.  Afterwards, I see this history:

 1  echo 1
 2  echo 24
 3  echo 3
 4  history
 5  echo 1
 6  history


That's not actually related to this change. I'll have to look elsewhere.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/