xonsh / xontrib-abbrevs

Command abbreviations. This expands input words as you type.
MIT License
19 stars 1 forks source link

`abbrevs` module seems to break reverse history searching #1

Closed raddessi closed 1 year ago

raddessi commented 2 years ago

xonfig

``` +------------------+----------------------+ | xonsh | 0.12.1 | | Git SHA | cd334e44 | | Commit Date | Apr 15 13:10:59 2022 | | Python | 3.8.10 | | PLY | 3.11 | | have readline | True | | prompt toolkit | 3.0.28 | | shell type | prompt_toolkit | | history backend | sqlite | | pygments | 2.10.0 | | on posix | True | | on linux | True | | distro | fedora | | on wsl | False | | on darwin | False | | on windows | False | | on cygwin | False | | on msys2 | False | | is superuser | False | | default encoding | utf-8 | | xonsh encoding | utf-8 | | encoding errors | surrogateescape | | xontrib 1 | abbrevs | | RC file | [] | +------------------+----------------------+ ```

Expected Behavior

Running C-r and then typing in a matching string then pressing return should select the match.

Current Behavior

Without the abbrevs module loaded, reverse searching history works fine.

With the abbrevs module loaded matching works fine, but I am unable to select the match via pressing return. Pressing return does clear the matching field but it does not insert the matching line in the terminal's curser and the reverse search prompt stays open.

For example, by pressing C-r ls I get to here:

 ~ $ ls
I-search backward: ls

But then after pressing return I am left here:

 ~ $
I-search backward: 

And the only way to exit is by pressing escape or C-c

Traceback (if applicable)

NA

Steps to Reproduce

bash
xonsh --no-rc
# reverse searching works

xontrib load abbrevs
# now reverse searching is broken

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

gforsyth commented 1 year ago

Fixed in xonsh/xonsh#5057