admin管理员组文章数量:1193188
How can I include redirects in $words
for zsh completions or do something equivalent?
If it cannot be done for $words
, I know that I can use ${(z)BUFFER}
to parse the full command line into an array. While that will include redirects from the command, it will also include separate commands from the same command line (command1 ; command2
), pipes (command1 | command2
), and possibly other things that are normally filtered out of $words
.
As a bonus, is there any way to specify whether other commands, pipes, etc. will be included in $words
?
If I cannot do this in $words
, please let me know if there is some easier way to get redirects in an array with the rest of the current command (excluding other commands, pipes, etc.) than manually filtering out other commands, pipes, etc. from ${(z)BUFFER}
(maybe there's a helper function that can do it; maybe there's another variable that zsh will populate; etc.).
本文标签: Include redirects in words for zsh completions or equivalentStack Overflow
版权声明:本文标题:Include redirects in $words for zsh completions or equivalent - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738479883a2089080.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论