mirror of
https://github.com/wavetermdev/inshellisense.git
synced 2026-08-05 13:43:30 -07:00
fix: windows powershell shell integration & backspace (#183)
* fix: windows powershell shellIntegration & backspace Signed-off-by: Chapman Pendery <cpendery@vt.edu> * fix: include cmd in backspace fix Signed-off-by: Chapman Pendery <cpendery@vt.edu> --------- Signed-off-by: Chapman Pendery <cpendery@vt.edu>
This commit is contained in:
+2
-1
@@ -254,7 +254,8 @@ const convertToPtyTarget = async (shell: Shell) => {
|
||||
case Shell.Bash:
|
||||
shellArgs = ["--init-file", path.join(shellFolderPath, "shellIntegration.bash")];
|
||||
break;
|
||||
case (Shell.Powershell, Shell.Pwsh):
|
||||
case Shell.Powershell:
|
||||
case Shell.Pwsh:
|
||||
shellArgs = ["-noexit", "-command", `try { . "${path.join(shellFolderPath, "shellIntegration.ps1")}" } catch {}`];
|
||||
break;
|
||||
case Shell.Fish:
|
||||
|
||||
+5
-1
@@ -130,7 +130,11 @@ export const render = async (shell: Shell, underTest: boolean) => {
|
||||
if (previousSuggestionsRows > 0 && inputHandled) {
|
||||
term.noop();
|
||||
} else if (!inputHandled) {
|
||||
term.write(press.sequence);
|
||||
if (press.name == "backspace" && (shell === Shell.Pwsh || shell === Shell.Powershell || shell === Shell.Cmd)) {
|
||||
term.write("\u007F");
|
||||
} else {
|
||||
term.write(press.sequence);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user