PowerShell divide by zero error (in emacs eshell.) (2016)

By Xah Lee. Date: . Last updated: .
emacs eshell powershell divide by zero 2016-08-19
divide by zero

same issue with docker, see

powershell divide by zero 2026-04-19 22c59
powershell divide by zero 2026-04-19 22c59 https://github.com/lzybkr/PSReadLine/issues/425

Solution

2016-08-23 David Wilson (https://x.com/daviwil) of PowerShell team gave solution:

powershell divide by zero 2026-04-19 22d31
powershell divide by zero 2026-04-19 22d31 https://x.com/daviwil/status/768149925091643392

this is probably because PSReadLine is treating it like a terminal. You may need to disable that module when running in eshell

If you only ever want to use PowerShell inside of eshell you could create a profile that unloads the module on startup (1/2)

in a normal terminal run powershell, type ‘vim $profile’ add “Remove-Module PSReadLine” there, save, then run powershell in eshell