jschaf / powershell.el

An Emacs mode for editing and running Microsoft PowerShell code.
94 stars 30 forks source link

PowerShell in Emacs 27.2 #31

Open nyambol opened 3 years ago

nyambol commented 3 years ago

GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26

Per attached screenshot. The screen sizing code is writing itself to the shell when it opens (ESC-x powershell). And then every line feed is sent multiple times. This happens both with and without PSReadline module installed. Also occurs with both PS 5.1 and PS 7.

powershell-prompt-regex is set to (\(.*\))? PS .*

Note that after the initial creation of the buffer, the function _Emacs_SetWindowWidth() is written to output again, without resizing of the window.

Display is 34" LG HDR WFHD (HDMI), 2560x1080

emacs-powershell-pwsh-terminal2

Trisk3lion commented 3 years ago

I have the same problem, running Emacs 28 from main branch. powershell--silent-cmd-filter doesn't seem to do its job correctly

LuminousPath commented 2 years ago

Personally I haven't seen this occur with Powershell 5.1

seagle0128 commented 2 years ago

It occurs on Powershell 7.1+.

gwangjinkim commented 1 year ago

Same here with PowerShell 7.1.3 . In addition, it somehow doesn't recognize my profile.ps1 content - I define there aliases and functions (since it is the ~/.bashrc equivalent in Windows). How one could fix that?

dir function:

in the Powershell in emacs lists much fewer functions than the same command in Windows' native PowerShell console.

The self-defined functions in profile.ps1 are missing.

But the missing of self-defined functions is also observed after M-x shell in the shell (powershell). There, dir function: leads to

"function:" is not a recognized device.
"fucntion:" is not a recognized device.
volume in drive C is <computername>
Volume Serial Number is <serial number>

  Directory of ...(current path)

File Not Found