valiev / almostontop Goto Github PK
View Code? Open in Web Editor NEWalmostontop zsh plugin
License: MIT License
almostontop zsh plugin
License: MIT License
When you press enter after typing a command, screen always blinks for a second as the plugin calls clear
internally. I find that slightly annoying so I was wondering if it could be replaced with something which doesn't cause the flickering? Maybe this post could serve as an inspiration. Might even do a PR if I find time. Thanks for considering this, Petr
almostontop_preexec:7: bad substitution
Hi,
This plugin can be very useful for cases with output longer than one screen. It will be nice to read stdout from the top, instead of scrolling the terminal up to the place where a command was written, and making sure that you will not miss that spot like always ;)
For example, $ echo $EDITOR without almostontop just gets executed as $ echo $EDITOR
But with almostontop, it gets replaced with $ echo ~/bin/micro
In 0.5.0, the screen would clear only after actually running a command. If I just pressed return one or more times, lines would be added as they would be in a zsh without almostontop. This seemed the correct and unsurprising behavior.
In 0.6.0, pressing return clears the screen, but leaves two prompt lines on the screen. (Just press return once and you'll see -- let me know if you need a screen shot.)
It seems that the plugin should do one or the other -- either clear the screen after an empty command, leaving only one line with the current prompt, or allow multiple empty commands to stack up before clearing the screen for a real command.
https://github.com/zsh-users/zsh-syntax-highlighting
When you're typing a command zsh-syntax-highlighting does it's thing and the command is correctly highlighted but once you press enter and almostontop kicks in, the highlighting is lost -- it's just a minor annoyance and you can always just scroll up and look at the highlighted command above but I thought I'd just report it anyway in case it's easy to fix.
See this for a demonstration.
I prefer to have this plugin keep the scrollback buffer when clearing the screen.
To do so I added the -x
flag to the clear command on line 16 of almostontop.plugin.zsh.
Now after every command the screen is cleared but I am still able to access the outputs of previous commands by scrolling up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.