Pash-Project / Pash

An Open Source reimplementation of Windows PowerShell, for Mono.
https://groups.google.com/group/pash-project
BSD 3-Clause "New" or "Revised" License
514 stars 54 forks source link

Linux terminal issues #402

Open ForNeVeR opened 9 years ago

ForNeVeR commented 9 years ago

Pash terribly works with TERM set to anything but xterm: sometimes arrow keys aren't work, sometimes delete key on my keyboard will not delete characters.

TERM can be reset not only by some Linux distros and terminal emulators such as Konsole, but also by Linux utilities screen and tmux (these two set TERM=screen AFAIK). We definitely need to do something about that.

For example, currently I have problems with tmux on nixos 15.0.9. Running TERM=xterm pash doesn't help completely, and I am not sure whether it could broke anything else (terminal formatting, scrolling, coloring etc.).

We need someone to investigate these issues and get a resolution (maybe we could simply set TERM to xterm inside of Pash code or somehow operate with Mono console subsystem to fix the issues).

ForNeVeR commented 9 years ago

Here's a case that cannot be fixed by TERM=xterm in my environment:

bash$ echo $TERM
screen
bash$ TERM=xterm pash
pash> # Currently arrow keys and Delete key works correctly
pash> less /var/log/kdm.log # or other program that works in interactive mode, for example sh -c 'man man'
pash> # And now the arrow keys prints letters D and C to the command line, sometimes ~D and ~C
ForNeVeR commented 9 years ago

Also, Home and End keys does not work with Pash in any of my Linux environments (with tmux or without it). They does work in bash and I haven't customized anything.