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

zellij pipe command (at least) try to parse in its <PAYLOAD> part (after --) #3577

Open
Tracked by #1
Zykino opened this issue Aug 30, 2024 · 0 comments
Open
Tracked by #1

Comments

@Zykino
Copy link
Contributor

Zykino commented Aug 30, 2024

2. Issues with the Zellij UI / behavior / crash

Issue description

Getting an error that zellij pipe does not understand an argument (that star with a "/") while it should not parse the arguments anymore since we are after the -- separator (into the PAYLOAD section).

Minimal reproduction

Doing zellij pipe --plugin zc -- edit /foo 38 (with zc an alias to a local file pointing to my zellij-console plugin build) result in the following message:

error: Found argument '/foo' which wasn't expected, or isn't valid in this context

USAGE:

zellij pipe [OPTIONS] [--]

  • Send data to a specific plugin:

zellij pipe --plugin file:/path/to/my/plugin.wasm --name my_pipe_name -- my_arbitrary_data

  • To all running plugins (that are listening):

zellij pipe --name my_pipe_name -- my_arbitrary_data

  • Pipe data into this command's STDIN and get output from the plugin on this command's STDOUT

tail -f /tmp/my-live-logfile | zellij pipe --name logs --plugin https://example.com/my-plugin.wasm | wc -l

For more information try --help

Other relevant information

There are multiples workaround:

  • Put the command inside quotes (simple ' or double ")
  • Use stdin: echo edit /foo 38 | zellij pipe --plugin zc
  • For plugin authors, accept an argument like: zellij pipe --plugin zc --args="command=edit /foo 38" (kind of the same workaround as the previous one since I’m forced to quote because I have some spaces).

The workarounds works… but ain’t as easy to use. I don’t want to quote the commands since I want the shell to help with auto-completing path among other things. The echo … | … syntax feels a bit heavy and don’t makes for easy to write shell alias like zc <my-command>.

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