-
Notifications
You must be signed in to change notification settings - Fork 25
Default command handler #21
Comments
@poma hi, i'm having some little troubles with this, first, i couldn't ever change my shell to zsh with chsh command, so i start my outbash.exe with |
Try The idea of this script is to run I've just realized that my script uses |
Also updated script to allow commands from home dir (false by default) but be careful with it |
thanks man! works perfect!! i couldn't be happier right now, i really appreciated, chsh in the other hand, still not working, i just change "command_not_found_handle" to "handler" for now, if it becomes a problem in the future, so it be lol, thanks again man and take care, regards! |
Cool script! Any idea if Ctrl-Z can be made to work properly with it? Oddly suspension is propagated to the win32 side but I don't get back the shell prompt (tried with bash) |
Update about Ctrl-Z: hm and it's not just because of the use of a function and not even because of the use of command_not_found_handle. Weird. I will take another look later. |
Found a bug: this script will override default command-not-found script that suggests to install packages when command is not found (enabled in bash by default and in zsh via |
@xilun Ctrl-Z works for me. I can successfully freeze notepad, get shell prompt, and then unfreeze it. |
More testing: with this command not found handler, Ctrl-Z works under zsh, but not bash. This might be a bash bug or a WSL bug, I'm looking into it. |
This seems to be mainly a bash bug, however the behavior of bash is actually worse on a real Linux system in this case (Ctrl-C after a Ctrl-Z does not work), so there might also be a WSL bug (which in this case slightly improves the usability) to find in there :p |
Here is a script for people that want to use WSL like Cygwin. If command is not found on Linux it will attempt to run it on windows automatically:
Just save this script to a file and add
source this_script.sh
to.bashrc
or.zshrc
depending on your shell. This is pretty basic implementation, feel free to improve itThe text was updated successfully, but these errors were encountered: