Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: spin until a file descriptor changes. #780

Open
x85446 opened this issue Dec 13, 2024 · 0 comments
Open

Feature: spin until a file descriptor changes. #780

x85446 opened this issue Dec 13, 2024 · 0 comments

Comments

@x85446
Copy link

x85446 commented Dec 13, 2024

I want to spin until a file descriptor changes.

I have already implemented it, but want to see if you guys want any changes to how you call it.

Option A (as implemented):

  • ignore the command section
  • pass a flag with string
    gum spin --file-change=/tmp/c1 " -- ""

current help

Usage: gum spin <command> ... [flags]
...
  -f, --file-change=STRING    Spin until file descriptor changes. (Command not run.)

Option B:

take over the command section with the path
gum spin --file-change " -- "/path/to/file"

possible help

Usage: gum spin <command | path> ... [flags]
...
  -f, --file-change   Spin until file descriptor changes. (Provide path as arg.)

Option C

workaround: install fswatch and call it
gum spin -- fswatch -1 /tmp/c1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant