it works if TERM is set to "cygwin", in your env variable in .hyper.js for example.
however this results in only allowing for 8 colors.
@NinjaRasel
OS version and name: Windows 10
Hyper.app version: 1.4.8
I'm using the clear command and it works fine 馃
Thanks @Juici and @MAPESO .
It's work fine when I use cygwin terminal :smile: but when use git bash then face this Issue :disappointed:
@NinjaRasel
OS Version: Windows 10 Home (Version 1703) (Build 15063.674)
Hyper.app version: 1.4.8 Stable
Git Version: 2.12.2.windows.2
Can confirm that this is an issue with git bash. The clear command does not clear the console but does return cursor to the top of the console. All commands from this point do not overwrite but overlay with old output until the console starts to scroll.
Hyper 2.1.0 + Microsoft Windows 10 Professional + Git Bash + Hyper Snazzy plugin
@jonathanlinat Same issue here.
+1
@Gander7
I used clear command on ubuntu terminal too and works great. But on windows face this issue.
But not sure that occurs with git bash.
@NinjaRasel Maybe my wording was wrong :P
I don't think it's an issue with git bash, but the integration of git bash and hyper.
If I clear
in git bash without hyper it works, but if I clear
with git bash in hyper then I get @jonathanlinat 's gif. (Windows Only)
reset
works with git bash in hyper, it's just clear
is my reflex :P
I have the same issue on 2.10 with Window 10 Pro.
Here my Hyper config file : https://gist.github.com/scote/6e350bc32d0c9bc67e4b814a6a1ef826
Can you try to set your TERM env variable as explained here: https://github.com/zeit/hyper/issues/1924#issuecomment-335154779%23issuecomment-335154779
just to clarify for everyone:
setting your TERM env variable to cygwin
(or msys
) will fix the issue with the clear
command.
however, the issue here is: using mintty with gitbash (or cygwin etc.), you can set xterm-256color
and get 256 bit colour with clear
working normally.
but with cygwin
set in hyper you can only get 8 bit colour, or set xterm-256color
and break the clear
command.
I imagine there is an issue with ANSI characters being misinterpreted by the hyper term.
@chabou This fix doesn't work for me.
Just tested your shell config with TERM env var added ( env: {TERM:'msys'},
) and it works like a charm.
Please double check it.
Adding your own shell, i.e shell: 'C:\\Windows\\System32\\bash.exe'
, within the .hyper config is one solution to this problem. I wanted to use Bash on windows anyways, so that works for me.
I've noticed this on MacOS as well.
MacOS 10.12.6
Hyper 2.0.0
As a workaround, "alias clear=reset" works okish. TERM:msys doesn't work for me on Windows MINGW.
Hyper 2.1.2 +verminal plugin+ Win 10 + Git Bash.
Using env: {TERM: "msys"}
fixed clear
for me.
I have a lot of weird buffer clearing bugs with Hyper, but this one is definitely the worst. However, for me, it mainly only affects me if I'm SSH'd into certain servers.
Just tested your shell config with TERM env var added (
env: {TERM:'msys'},
) and it works like a charm.Please double check it.
that solved the problem, close this issue.
Thanks!
Thank you all!
I found that setting the term to linux
for example worked okay for my SSH'd server. If anyone else is having these issues with clear while SSHing try different options available to you. Using xterm
or any variations as listed above is not compatible.
Setting term to msys or cygwin does not work for me. I've got git bash + hyper as well. It just moves the cursor to the top. Is there some other fix as well?
Windows 10 Hyper 3.0.2
Clear also failing for me.
Should not have been closed. Proposed solutions are workarounds with side effects (like reduced colourset i imagine) and do not fix the actual bug.
it works if TERM is set to "cygwin", in your env variable in .hyper.js for example.
however this results in only allowing for 8 colors.
Added a .bash_profile
(using cmder as a base on windows) with:
export TERM=cygwin
and works like a charm 2 years later with 3.0.2.
@FierceBengalTiger please reopen as solution is not a universal fix, rather a workaround.
@orangelynx
Done.
Also having some issues clearing the buffer of hyper. I'm using the Windows 10 bash.exe
.
Setting TERM
to cygwin
fixes the general issue of clear
not working but it does not fully clear the buffer. For example, after closing vim
, there is still about the half of vim still visible (maybe a different buffer issue?).
However, after running clear
, there are still the last few lines visible.
Same results for msys
. Running export TERM="cygwin"
(when env TERM = msys
) fixed the clear issue, it changed the color scheme as was already reported. But that does not happen when TERM is cygwin
through the env
config property.
I'm not too familiar with the TERM environment variable but when using bash.exe
as shell, msys
is an "unknown terminal type". I guess that's because under the hood I'm looking at a Ubuntu shell and not a cmd prompt.
Edit: I noticed another issue when export TERM="cygwin"
is in bashrc, using vim
via SSH connections is not working properly.
You can pass the TERM
argument to clear
and it will work just fine...
The problem is actually that the clear
command doesn't understand the term value msys | cygwin
To test it simple run it from your terminal...
~ $ ls -la .
~ $ /usr/bin/clear -T cygwin
To persistently pass the term value simply create an alias in ~/.bashrc
or source /.bash_aliases
Using linux
works fine for me..
~/.bash_aliases
alias clear='clear -T linux'
I was getting a terminal error when using cygwin as a terminal, the following did the trick for me. This is for Windows 10.
alias clear='_TERM=$TERM;TERM=cygwin;/usr/bin/clear;TERM=$_TERM';
Still running into this issue on Windows with Hyper Snappy & ZSH. 馃槩
i tried below steps to solve this issue:
Thanks all.
For anyone out there still with this issue, make sure to close all tabs and restart hyper completely to test new configurations. My problem was not fixed by env={TERM: "msys"}
until I restarted the whole application.
Most helpful comment
Just tested your shell config with TERM env var added (
env: {TERM:'msys'},
) and it works like a charm.Please double check it.