ctx-tui 2.0.4

Manage repo-scoped work contexts: fresh checkouts wrapped in terminal multiplexer sessions
Documentation
�

"�ji��h�SrSSKrSSKrSSKrSSKJr SSKJrJrJ	r	 Sr
S\S\4SjrS	\S\4S
jr
g)a�Run pane commands through the user's interactive shell.

Multiplexers exec a pane's command directly, bypassing the shell, so
prompt-hook environment loaders (direnv, mise, ...) never run for the
pane. via_shell defers each command to a launcher script instead: the
user's shell starts interactively with the script as stdin, sources its
rc files and fires its prompt hooks, and only then reads the script's
single line, which execs the command with stdin re-pointed at the
pane's tty.
�N)�Path)�Node�Pane�Splita�#!/bin/sh
shell="${SHELL:-/bin/sh}"
case "${shell##*/}" in
    zsh)
        # zsh's line editor reads the tty directly, ignoring a non-tty
        # stdin; +o zle makes zsh read the heredoc.
        set -- -i +o zle
        ;;
    *)
        set -- -i
        ;;
esac
# Hand the pane tty down on fd 9 rather than reopening /dev/tty: macOS
# kqueue cannot watch the /dev/tty alias, leaving kqueue-polling TUIs
# (anything on Node) deaf to input.
exec "$shell" "$@" 9<&0 <<'CTX_PANE_COMMAND'
�command�returnc���[R"SSS9up[R"U5 [	U5R[SUS3-5 S[R"U53$)Nz	ctx-pane-z.sh)�prefix�suffixzexec z <&9 9<&-
CTX_PANE_COMMAND
zsh )	�tempfile�mkstemp�os�closer�
write_text�_LAUNCHER_HEAD�shlex�quote)r�fd�paths   �F/Users/michael/dev/contexts/ctx/rewrite-it-in-rust/src/ctx/shellrun.py�	_launcherr*sY�����{�5�A�H�B��H�H�R�L���J���.�U�7�)�;X�+Y�Y�Z�
����T�"�#�$�$��nodec���[U[5(a6URcU$[[UR5URS9$[UR[SUR555$)z>Defer each command pane to a launcher run by the user's shell.)�focusc3�8# �UHn[U5v� M g7f)N)�	via_shell)�.0�panes  r�	<genexpr>�via_shell.<locals>.<genexpr>7s���&N�:�4�y����:�s�)	�
isinstancerrrrr�	direction�tuple�panes)rs rrr1sX���$�����<�<���K��I�d�l�l�+�4�:�:�>�>������&N�4�:�:�&N�!N�O�Or)�__doc__rrr�pathlibr�
ctx.layoutrrrr�strrr�rr�<module>r+sN��	�
����(�(�
��(%�s�%�s�%�P�D�P�T�Pr