You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A sabbrev function to automatically detect and replace a executable command (without suffix) to match available commands with a list of suffix (configurable)
Eg: run-tests can match run-tests.sh
This behaviour is especially helpful in WSL when .exe files are valid executables and this makes it much easier to use windows based commands
Eg: wsl -> wsl.exe
This should expand either on space or when executing without having the exact same command.
This looks similar to how #421 (reply in thread) is implemented to recreate the autocd behaviour.
I currently use the below code as a workaround, but it completely breaks the code highlighting and is only restricted to .exe suffix which can be fixed with some tweaks but the syntax highlighting is still broken.
command_not_found_handle() {
local cmd="$1"shiftifcommand -v "${cmd}.exe">/dev/null 2>&1;then"${cmd}.exe""$@"returnfiecho"command not found: ${cmd}">&2return 127
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
A sabbrev function to automatically detect and replace a executable command (without suffix) to match available commands with a list of suffix (configurable)
Eg: run-tests can match run-tests.sh
This behaviour is especially helpful in WSL when .exe files are valid executables and this makes it much easier to use windows based commands
Eg: wsl -> wsl.exe
This should expand either on space or when executing without having the exact same command.
This looks similar to how #421 (reply in thread) is implemented to recreate the autocd behaviour.
I currently use the below code as a workaround, but it completely breaks the code highlighting and is only restricted to .exe suffix which can be fixed with some tweaks but the syntax highlighting is still broken.
All reactions