On 2/2/23 5:26 PM, Addison Brendtro wrote:
Bash Version: 5.1
Patch Level: 16
Release Status: release
Description/Repeat-by:
Setting aliases like so:
# arbitrary key
bind '"\C-xa": alias-expand-line'
# expand aliases with space
bind '" ": "\C-v \C-xa"'
Creates a FISH-like abbreviation system using aliases. For some
reason, though, typing a space before another word skips to the end of
that word. This does not happen when typing "\C-v \C-xa" manually.
It's a heuristic about where rl_point should go. If the line is expanded,
you lose where point was in relation to the expanded alias, so the
function assumes you expanded a word to a word and skips to the end of it.
It doesn't check to see whether or not any aliases were expanded, or
whether the expanded line differs from the original one.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/