Comments (4)
Hey!
P.S. Thanks for the tool - it's awesome. Yesterday I integrated in some of my fish functions for administration and it's so much nicer to use now!
Thank you for the kind words!
You can actually accomplish this with pure shell scripting, here is an example:
https://github.com/charmbracelet/gum/blob/main/examples/filter-key-value.sh
export LIST=$(cat <<END
Cow:Moo
Cat:Meow
Dog:Woof
END)
ANIMAL=$(echo "$LIST" | cut -d':' -f1 | gum filter)
SOUND=$(echo "$LIST" | grep $ANIMAL | cut -d':' -f2)
echo "The $ANIMAL goes $SOUND"
This allows everyone to use whatever delimiters they want and makes it much more flexible instead of prescribing a solution with flags inside of gum
.
from gum.
😢 That's not really the same and MUCH LESS readable. But thanks for the suggestion.
from gum.
That's not really the same
Hmm, I may have misinterpreted your original example then. Could you elaborate on what you are trying to do and I can try and put together a more readable example for you?
from gum.
No, it seems that your interpretation was correct. :)
However, gum choose
doesn't have search bar and have multi-selection and it "feels" different than gum filter
.
I'll implement new behavior for myself anyway and then I can show the code - maybe you'll reconsider. :)
Thanks.
from gum.
Related Issues (20)
- Add a command palette
- Outdated syntax in pager command example comment
- add (shift) tab keybindings
- 0.14.0 release was not completed HOT 5
- Pressing `a` to select all in `gum choose` no longer works
- Release 0.14.0 does not contain any release assets HOT 4
- fish completions break tab-completion of files/folders
- Unnecessary whitespace output
- gum write completion (intended?)
- gum choose wrapping (intended?) HOT 1
- cursor foreground color
- gum confirm no longer lets you disable negative message HOT 1
- gum confirm does not work on powershell HOT 1
- "Esc" does not exit "gum input" anymore
- gum choose prints "user aborted" when you ctrl-c HOT 1
- Gum spin only accepts a hard-coded command
- gum choose v0.14.0: timeout no longer working
- gum choose does not center Yes and No in a centered manner like the previous gum versions
- Can't extract with `tar -x` HOT 2
- gum v0.14.0 confirm: no longer able to answer with Y/N keys
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.