-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to start in Msysgit bash on Windows #98
Comments
I asked Timon, the leader of the crossterm project.
|
Fooey; it does sound like it's difficult to tie those things together. I think this setup just might not be supported for a while then. |
@sidfarkus There's still hope. I reopen the issue as the problem is clear and is absolutely not solved (but yes this might take a while) |
This combination almost works:
The first and second issue are what will probably make this a futile goal, since there is no native cygwin build of the Rust toolchain as far as I am aware. So even if the screen I/O issues are solved, broot.exe will use Win32 paths/APIs and cygwin shells will use the cygwin.dll equivalents, which are not compatible and/or invisible to each other. EDIT
It all installs and builds cleanly, but this time broot.exe exits with the "crossterm error" message. Given that the cargo installed by this approach is giving me Win32 style paths, I suspect that even if made to work it would still be using Win32 paths, not the msys2 style ones bash.exe from msys2 would expect. So it has the same issue as trying to run broot inside and for cygwin usage. EDIT2 I managed to get br to do proper console I/O under a cygwin bash.exe, it was a mater of making sure you are using a very recent cygwin version with support for the new Windows console API, then the right console emulator.
This launches br and your can use the UI normally, but when trying to cd in to a folder it panics with:
But it seems it never actually reaches this point, since the fatal error is a Rust error. EDIT3 EDIT4 Translating the mktemp path when calling broot.exe, then translating out any paths before doing the eval, makes br/broot finally usable under cygwin (provided you are using a very recent cygwin version and the right console program as per EDIT2): function br {
f=$(mktemp)
ft=$(cygpath.exe -w $f)
(
set +e
broot --outcmd "$ft" "$@"
code=$?
if [ "$code" != 0 ]; then
rm -f "$f"
exit "$code"
fi
)
code=$?
if [ "$code" != 0 ]; then
return "$code"
fi
d=$(<"$f")
rm -f "$f"
# d is a bash expression, not a path, so we cannot use cygpath
# remove UNC prefix
d=${d//\\\\?\\/}
# unix slashes
d=${d//\\/\/}
# translate drive identifier if present
re='([A-Za-z]):'
while [[ $d =~ $re ]]
do
drive_upper=${BASH_REMATCH[1]}
drive_lower=${drive_upper,,}
d=${d//$drive_upper\:\//\/cygdrive\/$drive_lower/}
done
eval "$d"
} |
Don't worry for the "spam". It's better to record it. Even if I don't really have time now to study this, somebody else may, now or later. |
|
@gadros For the alt-enter hijacked by your terminal, you can define another shortcut in conf.toml, for example
|
thanks a lot for the quick and prompt reply. |
Trying to use this on Windows 10 Pro Version 10.0.18362 Build 18362
Installing with Rust:
cargo install broot
And adding broot to bashrc:
source /c/Users/myuser/AppData/Roaming/dystroy/broot/config/launcher/bash/br
Running
br
gives me the following output:When I run
broot
in powershell on my system it functions but is slow to redraw.The text was updated successfully, but these errors were encountered: