Comments (4)
Thanks for the report. It seems what was happening is that the virtual processing terminal mode was persisting across processes. I've now fixed things so that exit() will restore the console mode. You can download the latest binaries here: https://justine.lol/redbean/index.html and https://justine.lol/cosmopolitan/download.html
from cosmopolitan.
After you run it, you can no longer use the arrow keys to go to the previous command, instead it prints the control characters: ^[[A
same issue on my machine. build on WSL2, run in WSL2 - OK, run in win32 CMD.exe - as above.
from cosmopolitan.
A temporary workaround for this is to run in a Powershell console, where this doesn't happen, or just run CHCP 437
after running the APE binary. It seems like it's not resetting the code page after changing it to 65001 (UTF-8) in https://github.com/jart/cosmopolitan/blob/master/libc/runtime/winmain.greg.c.
See also https://ss64.com/nt/chcp.html for more on CHCP
.
Edit to add: actually, it seems you can just run CHCP
with no arguments to stay in UTF-8 code page, but somehow this resets the console state so that arrow keys work again 🤷
from cosmopolitan.
It looks like we ought to grab the codepage at the beginning and then restore it on exit. I'll take a look at doing that and see if that is what is causing it. It worries me that it got fixed without resetting the codepage. Maybe there is something else that needs to be reset.
from cosmopolitan.
Related Issues (20)
- `ape -` without arguments is broken HOT 7
- [redbean] OnServerHeartbeat() is broken in non-daemon mode
- [Windows] Use WSADuplicateSocket to duplicate socket handles on fork
- zlib name clashes since #1142 HOT 5
- Allow replacing `jartsr=` magic with `#!/bin/sh` header
- cosmocc segfaults on static struct sigaction HOT 2
- confstr() is declared in <stdio.h> rather than <unistd.h>
- Python binary is packaged without certificates HOT 4
- [Windows] execve regression
- test/posix/fread3gb_test fails on XnuSilicon
- cosmo.zip offiline? HOT 3
- llamafile --assimilate: corrupted program header size HOT 1
- test/libc/calls/open_test: open_readOnlyCreatMode gives wrong errno, but not with --strace, on linux aarch64 HOT 1
- Bug: Mac llamafile make issue HOT 1
- testing github autolabeler label is too noisy
- Bug: On Windows, cosmos GNU coreutils ls not printing correct result for `ls ../../` HOT 4
- compile_commands.json generator for clangd integration HOT 1
- Bug: Lua fails a `seek`-related test
- Bug: Lua's `ltests.c` doesn't compile
- Bug: secondary redbean SQLite WAL connections lock after first write HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmopolitan.