Comments (12)
Nonono :)
Thanks for creating it!
from gum.
👍 We will try to fix this.
As a workaround you can make a script file and run that with gum spin ./file.sh
from gum.
Try and set the environment variable before gum
, which should pass the entire environment on to the sub-command:
VARIABLE="foobar" gum spin command
from gum.
Also if you want to use the output of the command to the variable use --show-output
and assign that.
VARIABLE=$(gum spin --show-output ....)
from gum.
Hi. Thanks for super-quick response.
It's rather a bit different scenario:
gum spin --title="Getting possible options..." LIST_OF_POSSIBLE_VALUES=$(aws s3 ls ...)
But the idea with external script is quite useful. Thanks for that :)
from gum.
This should work:
LIST_OF_POSSIBLE_VALUES=$(gum spin --show-output --title="Getting possible options..." aws s3 ls ...)
from gum.
This should work:
LIST_OF_POSSIBLE_VALUES=$(gum spin --show-output --title="Getting possible options..." aws s3 ls ...)
It's not, sorry :) Tried that before and tried that again.
from gum.
Ah, one more thing... What if the inner command output has to be processed with grep/sed/whatever?
I think the external script is the right way as otherwise the solution is too complicated (and actually not really required as the quite straightforward workaround is present).
from gum.
Can you try that again with the latest code, I pushed a fix that should make it work now:
#95
If it doesn't please reopen the issue
from gum.
Ah, one more thing... What if the inner command output has to be processed with grep/sed/whatever? I think the external script is the right way as otherwise the solution is too complicated (and actually not really required as the quite straightforward workaround is present).
You can write to a file instead of a variable to allow more global state sharing.
aws s3 ls > possible_options.txt
from gum.
I've build gum from current sources. You're ritght, it's displaying spinner and gets data in the background. Cool :)
You're awsome, thanks!
from gum.
Thank you for using Gum! @ppsx
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 HOT 1
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.