Comments (6)
Yes, I am currently working on that right now. The list will take up as much space as it needs by default and if it has enough space to display inline it will otherwise if the list is too long it will enter AltScreen
mode similar to how fzf
does which will keep the screen intact when you return to it.
from gum.
Hey, there is a --height
option that you can use but I will look into if I can fix it when there aren't too many options to choose from automatically.
from gum.
It looks like the height option does work, but I need to manually set it each time and I need to update it whenever the length of the list changes. Would it be possible for the height to have an automatic option so that it takes up as much height as needed to display the list?
from gum.
@zachoooo In the latest release, we enter AltScreen
if there is no --height
passed so it will clear the screen but then when the program exits everything will look as it was (no clear
effect) which should solve most of your problems.
In the future, I will add detection to see if we can display the entire list inline and do that if the TerminalHeight - CursorLineHeight > ListHeight
(i.e. there is enough space to display inline)
from gum.
Thanks! This is nice to have. For now I've just switched to using Python and had it calculate the height
variable based on the length of the list I'm passing in.
from gum.
Cool, this calculation should be done on gum
's end soon enough. Also, you could use wc -l
(https://en.wikipedia.org/wiki/Wc_(Unix)) to count the lines if you wanted to stay in bash land.
We will have this feature implemented once the cursor position can be queried so that we can accurately predict if the terminal has enough space to display the entire list.
from gum.
Related Issues (20)
- `x gum` -- A new way to use gum HOT 3
- Long lines and multiline items in `gum filter` and `gum choose`
- Provide an API to gum functionality HOT 4
- Double encoding in Powershell
- Features to make my arch Linux installation script much more feasible
- bash script passed to stdin fails after first gum call, unless wrapped in other control flow HOT 2
- spin output can not be piped HOT 10
- Gum Filter Being Weird HOT 1
- --selected doesn't work properly when value not on first page HOT 1
- Implement search functionality for `gum table` HOT 1
- filter also cycle like choose
- Allow gum confirm to be interrupted in a loop. HOT 3
- Docker image output is missing (sometimes vital) coloring. HOT 2
- Possible to not remove prompt/response? HOT 1
- Change the color of gum filter placeholder message HOT 1
- Combining format and style doesn't work as expected HOT 1
- huh forms using gum ? HOT 2
- [Feature Request] Support for Sixel/Kitty/iTERM in "style" function
- gum input: implement check for empty input
- Change Usage: gum confirm 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 gum.