Comments (2)
When opening a new terminal, pure first prints a prompt with first line empty and then after couple hundred milliseconds clears the terminal and writes prompt without a empty first line.
The Pure prompt should not re-render itself unless you are in a git
repo (and the actual prompt line changed). Also, the initial newline being erased sounds weird, it's almost as if your prompt setup/terminal is triggering a clear screen event.
A few thoughts:
- Why does it seem like you're using
dash
instead ofzsh
in some of those examples? - What version of Zsh are you using? (you didn't specify, report says
dash
) - Do you have any other Zsh configuration files, like
.zshenv
,.zprofile
,.zlogin
, etc?- What about similar files in
/etc
?
- What about similar files in
I'd like a option for it to write the prompt without the empty first line the first time it's printed.
See #233 (comment) as to why we can't support this.
from pure.
Environment details
It looks like theprompt_pure_system_report
reportsdash
as my zsh as it's my/bin/sh
. Here I'm invokingzsh
for a interactive shell directly when launching a terminal.
Zsh version is 5.8 (x86_64-pc-linux-gnu). Arch linux package.
No other Zsh config files in these tests (ZDOTDIR
was placed to a test directory with the .zshrc
and global /etc/zsh/*
and /etc/{zprofile,zshrc,zlogin} do not exist)
I also tried the python PTY debug process in a docker container (archlinux, zsh 5.8, latest pure
main branch tag v1.18.0) with pure cloned to /usr/share/zsh/pure
and zshrc
file as follows
# /etc/zsh/zshrc
fpath+=/usr/share/zsh/pure
autoload -U promptinit
promptinit
prompt pure
with this setup I only got one prompt
>>> from ptyprocess import PtyProcessUnicode
>>> p = PtyProcessUnicode.spawn(['zsh', '-i'])
>>> p.read()
'\x1b]0;(7cac67499309) /\x07\r\n\x1b[0m\x1b[27m\x1b[24m\x1b[J\x1b[39mroot\x1b[39m\x1b[39m@7cac67499309\x1b[39m \x1b[34m/\x1b[39m\r\n\r\x1b[35m❯\x1b[39m \x1b[K\x1b[?2004h'
so the issue seems to be somewhere in my local setup.
Anyway, I cannot reproduce the prompt getting written twice in the docker setup. I'll create a new ticket/reopen/comment if I find a way to reproduce the issue in a simple container.
See #233 (comment) as to why we can't support this.
That makes sense. I cannot come up with a trivial way to distinguish the case where a new empty terminal is launched from the other cases such as ssh
and launching zsh
from other shell.
This answers my question pretty well, for some reason I couldn't find the existing issues that well with GH issue search. Thanks! :)
from pure.
Related Issues (20)
- User and Hostname values HOT 4
- Installation on Raspberry Pi 4 running Ubuntu 20.04 LTS fails HOT 5
- Creates extra zsh session for each real zsh session. HOT 1
- Feat: Add option to disable `@hostname` in prompt HOT 11
- Disable path HOT 2
- How to use Right Prepromt for kube context? HOT 1
- Installing Pure in nix home manager HOT 4
- Whether to consider the configuration of maximum path layers HOT 2
- Pure runs a useless zsh subprocess with each command HOT 3
- How is `%12v` expanded to the virtual env name?
- How to activate python's venv indicator? HOT 1
- Tmux sessions spew async_worker_eval and async_job error messages HOT 1
- How do I always display the local user name HOT 2
- Git information no longer shown in prompt HOT 3
- Warp terminal incompatibility HOT 1
- znap pull fails after update to macOS Ventura HOT 1
- Feature request: customise terminal title format
- After installing Pure, terminal session shuts down on Enter keypress
- Feature Request: Truncate prompt path HOT 3
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 pure.