Skip to content

Commit

Permalink
Fix SSH recursive search with CTRL+R
Browse files Browse the repository at this point in the history
`group.erl` now sends `put_expand_no_trim` when entering a history search.
`ssh_cli` does not support that message and so when entering a search when
SSH is the underlying driver, the expanded result would not be displayed
even though the search functionality would still technically work.

This adds support for that `put_expand_no_trim` message when using SSH
  • Loading branch information
jjcarstens committed Jul 15, 2023
1 parent f211cce commit 236a874
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ssh/src/ssh_cli.erl
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ io_request({put_chars, Cs}, Buf, Tty, _Group) ->
put_chars(bin_to_list(Cs), Buf, Tty);
io_request({put_chars, unicode, Cs}, Buf, Tty, _Group) ->
put_chars(unicode:characters_to_list(Cs,unicode), Buf, Tty);
io_request({put_expand_no_trim, unicode, Expand}, Buf, Tty, _Group) ->
insert_chars(unicode:characters_to_list(Expand, unicode), Buf, Tty);
io_request({insert_chars, Cs}, Buf, Tty, _Group) ->
insert_chars(bin_to_list(Cs), Buf, Tty);
io_request({insert_chars, unicode, Cs}, Buf, Tty, _Group) ->
Expand Down Expand Up @@ -983,4 +985,3 @@ fmt_kv1({K,h,V}) -> io_lib:format("~n~p: ~s",[K, [$\n|ssh_dbg:hex_dump(V)]]).
type(0) -> "0 (normal data)";
type(1) -> "1 (extended data, i.e. errors)";
type(T) -> T.

0 comments on commit 236a874

Please sign in to comment.