hyper icon indicating copy to clipboard operation
hyper copied to clipboard

git bash clear command not working on windows again!

Open seriiix opened this issue 7 years ago • 16 comments

  • [x] I have searched the issues of this repo and believe that this is not a duplicate

  • [x] I am on the latest Hyper.app version

  • OS version and name: Windows 10 v1809

  • Hyper.app version: 3.0.2

  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/seriiix/4d1a4750b08f6355f0fb9b727d082e36

Issue

There was a well-known issue with clear command with bash on windows. It seems with v3 there is another issue related to this.

image

When I write clear it does clear some upper parts of the terminal but not all of it. I was using this config with v2, and everything was working as expected.

shell: 'C:\\Program Files\\Git\\git-cmd.exe',
shellArgs: ['--command=usr/bin/bash.exe', '-l', '-i'],
env: { TERM: 'cygwin' },

UPDATE: I noticed when I'm facing a situation like the above picture, Resizing the terminal will clear the bottom parts as well.

seriiix avatar May 09 '19 08:05 seriiix

I suspect this is because Hyper is using the default config now. Hyper 3 uses a different config location and ships with a default config, effectively ignoring settings from the old config. https://github.com/zeit/hyper/issues/3605

Try copying your old config to the new location as described in that issue.

SidneyNemzer avatar May 09 '19 17:05 SidneyNemzer

I set up my .hyper.js setting from scratch and get the same issue.

gif

spences10 avatar May 09 '19 19:05 spences10

@spences10 can you confirm that you've updated the config in the new location? I'm using Hyper 3 with Git Bash, and clear seems to work after I've re-applied my config.

SidneyNemzer avatar May 09 '19 19:05 SidneyNemzer

@SidneyNemzer yes, confirmed. So setting up from scratch would be using the shortcut Ctrl+, to open the configuration file and edit it from there, like you would if you were setting up from scratch (like a fresh install with no preconfigured options).

spences10 avatar May 09 '19 19:05 spences10

@SidneyNemzer No, as you can see (themes and fonts are not default), I already re-applied my old config.

seriiix avatar May 11 '19 05:05 seriiix

Do you guys have the WebGL renderer enabled?

The clear command works for me, I'm on Windows 10, Hyper 3.0.2, using Git Bash. I've got the WebGL renderer enabled.

SidneyNemzer avatar May 11 '19 06:05 SidneyNemzer

@SidneyNemzer Yes. I have WebGL enabled. Sharing .hyper.js file is part of the issue template. You can easily see my config in the mentioned gist. Also, I think you made a typo by saying you are using Hyper 1.0.2.

seriiix avatar May 11 '19 07:05 seriiix

I noticed when I'm facing this problem, Resizing the terminal will clear the bottom parts as well.

seriiix avatar May 11 '19 08:05 seriiix

Do you guys have the WebGL renderer enabled?

I haven't touched that setting so mine is whatever the default is.

spences10 avatar May 11 '19 08:05 spences10

I did a fresh install today. No issues with clear

My Settings with win10 and Hyper.app version: 3.0.2:

    shell: 'C:\\Program Files\\Git\\git-cmd.exe',
    shellArgs: ['--command=usr/bin/bash.exe', '-l', '-i'],
    env: { TERM: 'cygwin'},

rob32 avatar May 13 '19 19:05 rob32

Honestly i still can't clear properly.

Glenn-Jaya avatar May 14 '19 15:05 Glenn-Jaya

What versions of Git Bash is everyone using? I just remembered that I'm using an older version because the newer one had issues with Hyper.

$ bash --version
GNU bash, version 4.4.12(1)-release (x86_64-pc-msys)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ git --version
git version 2.14.1.windows.1

SidneyNemzer avatar May 14 '19 16:05 SidneyNemzer

What versions of Git Bash is everyone using? I just remembered that I'm using an older version because the newer one had issues with Hyper. (I'll edit this with my version when I get to my home PC).

@SidneyNemzer I believe it's not related to git bash because when I force re-render the terminal by minimizing and maximizing the window or resizing it, It'll get entirely clear.

@rob32 I also uninstalled and reinstalled the latest version but still, the problem exists.

seriiix avatar May 15 '19 07:05 seriiix

This is happening to me with Bash on Windows 10. I'm using Hyper 3.0.2. I uninstalled and reinstalled Hyper and the problem still persists.

sambrainerd avatar May 18 '19 14:05 sambrainerd

My main problem is the residue after executing htop.

捕获

But when I merged this code change, it worked fine.

  • https://github.com/xtermjs/xterm.js/pull/2149

When it detects my input, it draws the full screen.

image

image

Now, if you don't compile by yourself, you need to wait for upstream updates.

XinRoom avatar Jul 04 '19 07:07 XinRoom

Test again with a canary CI build please

Stanzilla avatar Oct 06 '19 19:10 Stanzilla