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

Invalid values for completion special parameters #38

Closed
vapniks opened this issue Mar 5, 2014 · 5 comments
Closed

Invalid values for completion special parameters #38

vapniks opened this issue Mar 5, 2014 · 5 comments

Comments

@vapniks
Copy link
Contributor

vapniks commented Mar 5, 2014

I'm trying to write a plugin that is context sensitive - it's behaviour depends on the words on the current command line. I tried using the completion special parameters $CURRENT and $words as documented in the zsh manual, but their values don't seem to match the current state of the command line. Can anyone help me here?

@termoshtt
Copy link
Contributor

Since zaw does not serve any completion widgets (zle -C),
the completion special parameters cannot be used.

We often use $BUFFER to insert commands,
and it can also be read from any zle widgets.
See 18.5 in Zsh Line Editor

@vapniks
Copy link
Contributor Author

vapniks commented Mar 7, 2014

Thanks

@vapniks
Copy link
Contributor Author

vapniks commented Mar 7, 2014

Btw, would be great to use zaw in a completion widget for command line options (to quickly find the option you want). How feasible is this?

@termoshtt
Copy link
Contributor

How feasible is this?

If you generate completion candidates in zaw sources, it will be easy.
However, it will be hard to replace completion widget with zaw.
I cannot find the way to change only selecting part of the completion.

Since I've never touched the completion widgets,
the above outlook may be incorrect.
You can get better answer if you post to zsh-workers ML.

@termoshtt
Copy link
Contributor

Inherited to #64

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

2 participants