denisidoro / navi

An interactive cheatsheet tool for the command-line
Apache License 2.0
14.61k stars 489 forks source link

Enable the use of Bash on Windows for both Navi and fzf #874

Open giggio opened 5 months ago

giggio commented 5 months ago

Is your feature request related to a problem? Please describe. I'd like to be able to set Bash as my shell on Windows. I share my cheat files between OSs, and I'd like to be able to use the same cheats and not need to rewrite them.

Describe the solution you'd like I'd like to be able to configure Navi so that it works with other Shells. Like so:

shell:
  # Shell used for shell out. Possible values: bash, zsh, dash, ...
  command: C:\Users\myuser\scoop\apps\msys2\current\usr\bin\bash.exe
  finder_command: C:\Users\myuser\scoop\apps\msys2\current\usr\bin\bash.exe

Describe alternatives you've considered I don't know any.

Additional context N/A.

giggio commented 5 months ago

Some more context. This seems to be the line causing one of my errors. For preview, that syntax won't work if you are using bash on Windows: https://github.com/denisidoro/navi/blob/f1cbed6d07298a9671e3b97e2786f9f2cc4002c4/src/commands/core/actor.rs#L68

Result at the top of the window is:

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ /c/Users/user/scoop/apps/msys2/current/usr/bin/bash: line 1: @echo.NAVIEOFNAVIEOForiginal_dirNAVIEOF: command not found            │
│ /c/Users/user/scoop/apps/msys2/current/usr/bin/bash: line 1: C:Usersuserscoopappsnavi2.23.0navi.exe: command not found