Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Extend `zed' with status bar, is it possible?
- X-seq: zsh-workers 43712
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Extend `zed' with status bar, is it possible?
- Date: Thu, 18 Oct 2018 18:27:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:from:date:message-id:subject:to :content-transfer-encoding; bh=NyPqWNRDJsXxBdBRsJrFbjnszIvtg6I4pV8WPXpfaJw=; b=kRTJ24/2cQO4aaEFhAneQhCFACEJMnIydvWpnssLWDcHKkVoEu5HLL9sErHJfsVUQK v/CyUsuzaNFOwFoLWFdS53m+vdAG5Jenu8x0dwRfOn9UkjIXs7lEj3eOo3bNzKqMgnfU 9/WbzrFo6gB9ek9/WymOcGly8Y3/dnFp19AlpllB3Sc1XIzFNco/KR/y9+Re+Zc1yrGc NnYrWwK70uD45TMKU1Zb9GpP9hBasjJSW/mz+yKUJm9quEwPP6TZelDULGDv8CXOPV9V 7Z/4TTiJq+M6lwERvN+9xwwUSs14aWohY8vQLCSCMl0wUSoME5HHtAxhpAfTLdIXku8n 3gug==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBu9Ddg1c0AAAYy8RjdhePcA_LcGj8sL=kns36-QM5f1w@mail.gmail.com>
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