laloch / xontrib-fzf-widgets

Set of fzf widgets for xonsh
GNU General Public License v3.0
33 stars 18 forks source link

Replace grep with re.findall #4

Closed deeuu closed 4 years ago

deeuu commented 4 years ago

Hey,

Capturing the output of grep in fzf_ssh results in the reported back cursor issue. Here's my xonfig if you're curious:

+------------------+-----------------+
| xonsh            | 0.9.18          |
| Python           | 3.8.3           |
| PLY              | 3.11            |
| have readline    | True            |
| prompt toolkit   | 3.0.5           |
| shell type       | prompt_toolkit  |
| pygments         | 2.6.1           |
| on posix         | True            |
| on linux         | True            |
| distro           | unknown         |
| 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 |
+------------------+-----------------+

To get around this, this PR proposes re.findall to filter the host names of the ssh configs.

laloch commented 4 years ago

Hi @deeuu, thanks for the PR! I don't really understand the mechanics of the "back cursor issue", but I like the new code more anyway.