mode
cyber-mux mode
Section titled “cyber-mux mode”Print just the detected backend name: tmux, rmux, herdr, wezterm, zellij, cmux, otty,
or none. The one-line version of doctor for scripts that only need the
backend name.
mode reports the drivable backend, so a mux that is recognized but cannot be driven answers
none. GNU screen is the one such mux today: inside it, mode prints none while
doctor still names screen as the multiplexer it detected. Ask doctor
when you want to know what you are inside; ask mode when you want to know what can be driven.
Usage
cyber-mux modeExamples
Section titled “Examples”cyber-mux mode# tmux# Branch a script on the backendif [ "$(cyber-mux mode)" = "none" ]; then echo "not inside a multiplexer"fi