Hyper: Using "clear" command doesn't clear the screen buffer

Created on 17 Aug 2017  路  12Comments  路  Source: vercel/hyper

Using the clear command doesn't clear the screen buffer.

This happens in both these situations:

  • Using the clear command through linux commands added to the path with git installation.
  • Connected to a linux vagrant machine through ssh

Using "cls" command (while in DOS prompt) works fine.

Screenshot:
2017-08-17_10h41_06

Hyper 1.3.3
Electron 1.4.16
win32 x64 10.0.15063

Windows

Most helpful comment

Same problem...

Temporary use CTRL + Shift + K to clear the commands!

All 12 comments

I ran into a similar issue on a similar system setup. This comment and this comment resolved the issue for me.

I had tried your suggestion and it worked (with both, cygwin and msys).

set TERM=cygwin
clear

I tried setting the Environment Variable so it would be fixed and every time I opened Hyper it would have it configured. It does not work, every time I open the console it has TERM=xterm-256color set, and I don't know where it's being set.
2017-08-21_13h35_34
Update: I set a Windows environment variable, but I later found out that in hyper config file there's a key for environment variables.

I've tried looking in %USERPROFILE%\AppData\Local\lxss\home\%USER%.bashrc which is the location of the .bashrc file for "Bash on Ubuntu on Windows" without luck. any ideas? I think it would be best if Hyper added xterm-256color to the list of terms with such behavior though.

Mmmmm it's strange. It looks as if Hyper is the one setting the term to xterm-256color
2017-08-21_13h39_48

I got it working from the Hyper configuration file:

env: {
    TERM: 'cygwin'
}

I still think it's better to add xterm support to Hyper.

This is still an issue in version 1.4.3

I don't now the internals, but I don't know why this doesn't work, as it works fine in both CMD.exe and PowerShell.

Try updating to 1.4.7. It should be resolved now.

Still not working. Trying with the new 1.4.7 and with a clean .hyper.js config file.

2017-09-21_08h34_32

I am on version 2.0.2 but still facing this issue. BTW I am on windows and 've set hyper for bash

I am on version 2.0.0 (stable) and still facing the issue where 'clear' does not work. The "shell" is set to shell: 'C:\\Program Files\\Git\\git-cmd.exe', and TERM is set to xterm-color. While setting TERM to cygwin allows 'clear' to work, it causes problems with vi/vim.

Same problem...

Temporary use CTRL + Shift + K to clear the commands!

  1. echo $SHELL to check what type of shell
  2. follow this https://kb.iu.edu/d/acpy

hyper 2.1.1 stable

Windows, Git For Windows's Bash... Clear and \022[2J both fail to work properly in Hyper.

from Configuration

    shell: 'C:\\Program Files\\Git\\bin\\bash.exe',
    shellArgs: ['-i'],
    env: {
      CHERE_INVOKING: "1",
      TERM: "cygwin",
    },

Setting TERM in my ~/.profile to cygwin works, but the configuration option doesn't seem to be tacking for env.

@tiagoboeing - when I use CTRL + SHIFT + K it mostly clears, but the active line still has text clobbering the current line and as soon as ENTER is pressed the clobbered screen re-appears.

This problem is not only for Hyper, when you are using Git Bash for Windows and integrate in a terminal external, bugs happens.

I'm using Terminus and CTRL + SHIFT + K have same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daenuprobst picture daenuprobst  路  3Comments

dbkaplun picture dbkaplun  路  3Comments

anthonyettinger picture anthonyettinger  路  3Comments

yvan-sraka picture yvan-sraka  路  3Comments

leo picture leo  路  3Comments