Open ciarancourtney opened 2 years ago
Hi, RESH works in WSL on Windows.
My guess is that MSYS2 Bash and shell in Git for Windows is not actual bash so it won't likely have all the bash features RESH needs.
If you want to, you can clone the repo and try to build and install RESH from source in MSYS2 or Git Bash. (git clone, cd into the directory, and make install
) If you see that it works then we can add windows to the installation and build.
Thanks @curusarn I started a branch on my fork will minimal changes to allow install on windows, and noted the following:
resh PANIC unrecognized OS
resh-session-init ERROR: 2022/12/19 11:54:59 Flag Parsing error (rt sess boot):strconv.ParseFloat: parsing "": invalid syntax
In summary I think the biggest hurdle is the perf impact, do you think the bottleneck is in shell or go?
resh-session-init ERROR: 2022/12/19 11:54:59 Flag Parsing error (rt sess boot):strconv.ParseFloat: parsing "": invalid syntax
This error looks like the way Resh gets current time fails. Is date
command available in MSYS2 bash? What does executing date +%s
print?
The TUI gets a little slow when the searched history is very large (e.g. very large preexisting bash history). Could this be the case? How many lines in your bash history?
What do you mean by ... and slows down all terminal commands significantly.
? How does the TUI slow don all terminal commands?
Resh does add some "invisible commands" to PS1 to be able to record history with directory, time, status, etc. I'm wondering if it the history recording works at all if the prompt gets broken. Can you check that commands are being recorded to Resh history?
This is how you can test it:
echo "we want to see this in resh history"
tail ~/.resh_history.json
You should see the echo "we want to see this in resh history"
in the output.
In summary I think the biggest hurdle is the perf impact, do you think the bottleneck is in shell or go?
Go should work the same on all platforms so the it shouldn't be slower on Windows than it is in WSL, on Linux or macOS. So based on that I would suspect shell to be the cause of the slowdown. There can be differences how the shell behaves between platforms.
This error looks like the way Resh gets current time fails. Is date command available in MSYS2 bash? What does executing date +%s print?
Yes, its the proper GNU date, so it prints the same seconds as on Linux.
What do you mean by ... and slows down all terminal commands significantly.? How does the TUI slow don all terminal commands?
I'm pretty sure its the PS1 manipulation thats causing the slowdown. My bash history is 5000 lines for reference.
Hi @ciarancourtney,
I have released RESH beta version: https://github.com/curusarn/resh/releases/tag/v3.0.0-rc2
In v3.0.0-rc2
, I have eliminated some dependencies which might fix the date parsing errors.
It also has prebuilt binaries for Windows.
The install script and shell files still don't recognize Windows so you will need some patches but the binaries are there.
Let me know if this helps.
If the prerequisites are 'Standard stuff: bash(4.3+), curl, tar, ..' the MSYS2 Bash shell, or the minimal one that comes with Git for Windows, should satisfy these requirements.