fish-shell/tests/checks/tmux-prompt.fish
Johannes Altmanninger 1e858eae35 tests: filter control sequences only when interactive
This demonstrates that we only write control sequences when interactive.
2024-04-12 12:28:22 +02:00

21 lines
463 B
Fish

#RUN: %fish %s
#REQUIRES: command -v tmux
set -g isolated_tmux_fish_extra_args -C '
function fish_prompt; printf "prompt $status_generation> <$prompt_var> "; end
function on_prompt_var --on-variable prompt_var
commandline -f repaint
end
'
isolated-tmux-start
isolated-tmux capture-pane -p
# CHECK: prompt 0> <>
set -q CI && set sleep sleep 10
set -U prompt_var changed
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 0> <changed>