2024-04-12 10:19:32 +00:00
|
|
|
#RUN: %fish %s
|
2021-07-03 11:57:21 +00:00
|
|
|
#REQUIRES: command -v tmux
|
2024-08-03 18:29:53 +00:00
|
|
|
#REQUIRES: uname | grep -v BSD
|
2021-07-03 11:57:21 +00:00
|
|
|
|
2021-08-29 07:44:22 +00:00
|
|
|
set -g isolated_tmux_fish_extra_args -C '
|
2024-04-19 09:25:05 +00:00
|
|
|
function fish_prompt
|
|
|
|
printf "prompt $status_generation> <status=$status> <$prompt_var> "
|
|
|
|
set prompt_var ''
|
|
|
|
end
|
2021-07-03 11:57:21 +00:00
|
|
|
function on_prompt_var --on-variable prompt_var
|
|
|
|
commandline -f repaint
|
|
|
|
end
|
2024-04-19 09:25:05 +00:00
|
|
|
function token-info
|
|
|
|
__fish_echo echo "current token is <$(commandline -t)>"
|
|
|
|
end
|
|
|
|
bind ctrl-g token-info
|
2021-07-03 11:57:21 +00:00
|
|
|
'
|
|
|
|
|
2021-09-24 15:07:17 +00:00
|
|
|
isolated-tmux-start
|
2021-09-04 23:54:08 +00:00
|
|
|
|
2021-08-29 07:44:22 +00:00
|
|
|
isolated-tmux capture-pane -p
|
2024-04-19 09:25:05 +00:00
|
|
|
# CHECK: prompt 0> <status=0> <>
|
2021-07-03 11:57:21 +00:00
|
|
|
|
2021-08-29 07:44:22 +00:00
|
|
|
set -q CI && set sleep sleep 10
|
2021-07-03 11:57:21 +00:00
|
|
|
set -U prompt_var changed
|
2021-09-24 15:07:17 +00:00
|
|
|
tmux-sleep
|
2024-04-19 09:25:05 +00:00
|
|
|
isolated-tmux send-keys Enter
|
|
|
|
# CHECK: prompt 0> <status=0> <changed>
|
|
|
|
|
|
|
|
isolated-tmux send-keys echo Space 123
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux send-keys C-g
|
|
|
|
|
|
|
|
# CHECK: prompt 0> <status=0> <> echo 123
|
|
|
|
# CHECK: current token is <123>
|
|
|
|
# CHECK: prompt 0> <status=0> <> echo 123
|
|
|
|
tmux-sleep
|
|
|
|
|
2021-08-29 07:44:22 +00:00
|
|
|
isolated-tmux capture-pane -p
|