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

Re: Extend `zed' with status bar, is it possible?



I got some progress on this. vared's option -t allows to select tty. So I have:

% cat /usr/local/bin/bash5
#!/bin/sh
tty
tty > /tmp/ttynum
sleep 200

Above is to get the tty created/used by tmux and make tmux just hang
on sleep. Then to run:

killtmux() { tmux kill-session -t vared_se; }
zle -N killtmux
saveterm="$(stty -g)"
tmux set -g default-shell /usr/local/bin/bash5 \; new-session -s vared_se &
sleep 3 && vared -t "$(</tmp/ttynum)" -f killtmux ZSH_VERSION
stty "$saveterm"

The point is, tmux can be configured to start small window at bottom
where ezed's / zedex's status bar will be shown. Above code works very
well except one thing: after 1st run/edit, second run fails with:

open terminal failed: not a terminal

This comes from tmux. Wonder what can happen to... /dev/tty? or
stdin/stdout, so that tmux cannot take control?
On Thu, 18 Oct 2018 at 07:10, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> Hello
> I'm looking at vared and it seems that there is no way to replace/append-to vared's last line (last POSTDISPLAY line?) with some custom contents, basically a status bar. Does someone know a way?
>
> Using zed to add debug-print lines / fine-tune modifications is a nice use-case, if done with syntax highlighting that includes brackets-highlighting. There is a group of developers that edit in-session (not hash-bang) scripts and could benefit from this – theme (prompt) creators. As established earlier, this would be for say `zedex', an extended version of zed (unsure if  it will succeed to include in upstream).
>
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org



-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



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