logoalt Hacker News

stingraycharles • today at 11:43 AM • 3 replies • view on HN

Seems well-designed, but what’s the use case? I’m trying to think of them but my creativity is failing me.


Replies

adregan • today at 12:11 PM

I have a small fish function that does something similar. It saves output to a file in XDG_CACHE_HOME. I wouldn’t use it for sensitive items like passwords or tokens in the examples, but I do use it for scripts that need to fetch some data from the network.

For example, I have a script for automating the creation of PRs which fetches the available labels for a repo from github and presents them with fzf multi select. I store the labels with a TTL of a week so that I don’t have to fetch them every time and the script compares the file’s age against the desired TTL to invalidate.

I find it useful for augmenting other programs, but I’m not typically using it on the cli directly.

frizlab • today at 11:46 AM

From the example in the Readme, I guess retrieving a token from an API, using a secret fetched from a secure vault that requests a password or TouchID validation.

Not sure if there could be other interesting uses. I can’t think of one anyways.

➕ show 1 reply
whilenot-dev • today at 11:48 AM

I have the same question, especially since any CLI output can be stored explicitly in some variable or temp file. What's the advantage of storing the output implicitly?

➕ show 1 reply