2024-04-12 10:19:32 +00:00
|
|
|
#RUN: %fish %s
|
2022-01-30 18:19:43 +00:00
|
|
|
#REQUIRES: command -v tmux
|
2022-03-13 10:48:52 +00:00
|
|
|
# disable on github actions because it's flakey
|
|
|
|
#REQUIRES: test -z "$CI"
|
2022-01-30 18:19:43 +00:00
|
|
|
|
2024-03-03 22:11:13 +00:00
|
|
|
# The default history-pager-delete binding is shift-delete which
|
2024-03-30 15:10:12 +00:00
|
|
|
# won't work on terminals that don't support CSI u, so rebind.
|
2023-01-17 08:14:54 +00:00
|
|
|
set -g isolated_tmux_fish_extra_args -C '
|
|
|
|
set -g fish_autosuggestion_enabled 0
|
2024-03-30 15:10:12 +00:00
|
|
|
bind alt-d history-pager-delete or backward-delete-char
|
2023-01-17 08:14:54 +00:00
|
|
|
'
|
2022-01-30 18:19:43 +00:00
|
|
|
isolated-tmux-start
|
|
|
|
|
|
|
|
isolated-tmux send-keys 'true needle' Enter
|
|
|
|
# CHECK: prompt 0> true needle
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux send-keys 'true hay ee hay' Enter
|
|
|
|
# CHECK: prompt 1> true hay ee hay
|
2022-07-17 00:46:12 +00:00
|
|
|
tmux-sleep
|
2022-01-30 18:19:43 +00:00
|
|
|
isolated-tmux send-keys C-p C-a M-f M-f M-f M-.
|
|
|
|
# CHECK: prompt 2> true hay needle hay
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux capture-pane -p
|
2023-01-17 08:14:54 +00:00
|
|
|
|
|
|
|
isolated-tmux send-keys C-e C-u true Up Up Escape
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux capture-pane -p | grep 'prompt 2'
|
|
|
|
# CHECK: prompt 2> true
|
|
|
|
isolated-tmux send-keys C-z _
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux capture-pane -p | grep 'prompt 2'
|
|
|
|
# CHECK: prompt 2> _
|
2023-08-08 19:53:42 +00:00
|
|
|
|
|
|
|
# When history pager fails to find a result, copy the search field to the command line.
|
|
|
|
isolated-tmux send-keys C-e C-u C-r "echo no such command in history"
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux send-keys Enter
|
|
|
|
# CHECK: prompt 2> echo no such command in history
|
|
|
|
isolated-tmux capture-pane -p | grep 'prompt 2'
|
2024-01-26 17:26:39 +00:00
|
|
|
isolated-tmux send-keys C-c
|
|
|
|
|
|
|
|
isolated-tmux send-keys C-r hay/shmay
|
|
|
|
isolated-tmux send-keys C-w C-h
|
|
|
|
isolated-tmux send-keys Enter
|
|
|
|
# CHECK: prompt 2> true hay ee hay
|
|
|
|
isolated-tmux capture-pane -p | grep 'prompt 2>'
|
|
|
|
isolated-tmux send-keys C-c
|
2024-02-16 17:43:16 +00:00
|
|
|
|
2024-04-13 18:08:12 +00:00
|
|
|
isolated-tmux send-keys 'echo 1' Enter 'echo 2' Enter 'echo 3' Enter
|
|
|
|
isolated-tmux send-keys C-l echo Up
|
|
|
|
isolated-tmux send-keys echo M-d
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux capture-pane -p
|
|
|
|
#CHECK: prompt 5> echo 2
|
|
|
|
isolated-tmux send-keys C-c
|
|
|
|
tmux-sleep
|
|
|
|
|
2024-02-16 17:43:16 +00:00
|
|
|
isolated-tmux send-keys "echo sdifjsdoifjsdoifj" Enter
|
2024-02-17 00:33:29 +00:00
|
|
|
tmux-sleep
|
2024-04-13 18:08:12 +00:00
|
|
|
isolated-tmux capture-pane -p | grep "^sdifjsdoifjsdoifj\|prompt 6>"
|
2024-02-16 17:43:16 +00:00
|
|
|
# CHECK: sdifjsdoifjsdoifj
|
2024-04-13 18:08:12 +00:00
|
|
|
# CHECK: prompt 6>
|
2024-02-16 17:43:16 +00:00
|
|
|
isolated-tmux send-keys C-e C-u C-r
|
|
|
|
tmux-sleep
|
|
|
|
isolated-tmux send-keys "echo sdifjsdoifjsdoifj"
|
|
|
|
tmux-sleep
|
2024-03-30 15:10:12 +00:00
|
|
|
isolated-tmux send-keys M-d # alt-d
|
2024-03-30 16:02:53 +00:00
|
|
|
tmux-sleep
|
2024-02-16 17:43:16 +00:00
|
|
|
isolated-tmux capture-pane -p | grep "(no matches)"
|
|
|
|
# CHECK: (no matches)
|
|
|
|
isolated-tmux send-keys Enter C-e C-u "echo foo" Enter
|
2024-02-17 00:33:29 +00:00
|
|
|
tmux-sleep
|
2024-04-13 18:08:12 +00:00
|
|
|
isolated-tmux capture-pane -p | grep "^foo\|prompt 7>"
|
2024-02-16 17:43:16 +00:00
|
|
|
# CHECK: foo
|
2024-04-13 18:08:12 +00:00
|
|
|
# CHECK: prompt 7>
|