iffse / pay-respects

Terminal command suggestion, alternative to thefuck written in Rust with AI support
https://codeberg.org/iff/pay-respects
GNU Affero General Public License v3.0
60 stars 6 forks source link

[Bug]: not working in cygwin environment #11

Open mokurin000 opened 2 hours ago

mokurin000 commented 2 hours ago

What happened?

image

The command and output

see above

Build information

version: 0.5.14 compile features:

No similar issue

To access unix paths, and to use correct PATH environment, we should compile pay-respects to cygwin target But rustc closed related support issue as unplanned A possible workaround is, writing a script to list evey possible executable, and call it inside pay-respects, if found msys2 environment.

This workaround also applies to MingW64 Git Bash

mokurin000 commented 2 hours ago
#!/usr/bin/bash

IFS=':'
for path in $PATH
do find "${path}" -maxdepth 1 -type f | while read _path
    do fn=${_path##*/}
        echo $fn
    done
done

Also, you can check https://www.msys2.org/docs/filesystem-paths/#manual-unix-windows-path-conversion

mokurin000 commented 1 hour ago
  1. type 'sshp'
  2. accept to run 'ssh'
  3. ssh failed, pay-respects get stuck