Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Calling interactive command inside widget



It's about having terminal attached to 0. I wrote a wrapper that runs
given interactive command from within Zle:

https://github.com/psprint/zsh-navigation-tools/blob/master/znt-usetty-wrapper

It's to be used in following way:

znt-usetty-wrapper some-interactive-command "$@"

via some widget file-function, like here:

https://github.com/psprint/zsh-navigation-tools/blob/master/znt-kill-widget

This looks quite like an overkill when compared to Bart's simple
</dev/tty, but it does some checking and searches for terminal also
via 2. Also, it restores previous 0 state. Maybe you'll like it

Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author