fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes Altmanningerreader: remove obsolete workaround98eaef277

master
2.3 KiB78 linesraw
1#RUN: %fish %s
2#REQUIRES: command -v tmux
3# disable on github actions because it's flakey
4#REQUIRES: test -z "$CI"
5
6# The default history-delete binding is shift-delete which
7# won't work on terminals that don't support CSI u, so rebind.
8isolated-tmux-start -C '
9    set -g fish_autosuggestion_enabled 0
10    bind alt-d history-delete or backward-delete-char
11'
12
13isolated-tmux send-keys 'true needle' Enter
14# CHECK: prompt 0> true needle
15tmux-sleep
16isolated-tmux send-keys 'true hay ee hay' Enter
17# CHECK: prompt 1> true hay ee hay
18tmux-sleep
19isolated-tmux send-keys C-p C-a M-f M-f M-f M-.
20# CHECK: prompt 2> true hay needle hay
21tmux-sleep
22isolated-tmux capture-pane -p
23
24isolated-tmux send-keys C-e C-u true Up Up Escape
25tmux-sleep
26isolated-tmux capture-pane -p | grep 'prompt 2'
27# CHECK: prompt 2> true
28isolated-tmux send-keys C-z _
29tmux-sleep
30isolated-tmux capture-pane -p | grep 'prompt 2'
31# CHECK: prompt 2> _
32
33# When history pager fails to find a result, copy the search field to the command line.
34isolated-tmux send-keys C-e C-u C-r "echo no such command in history"
35tmux-sleep
36isolated-tmux send-keys Enter
37# CHECK: prompt 2> echo no such command in history
38isolated-tmux capture-pane -p | grep 'prompt 2'
39isolated-tmux send-keys C-c
40
41isolated-tmux send-keys C-r hay/shmay
42isolated-tmux send-keys C-w C-h
43isolated-tmux send-keys Enter
44# CHECK: prompt 2> true hay ee hay
45isolated-tmux capture-pane -p | grep 'prompt 2>'
46isolated-tmux send-keys C-c
47
48isolated-tmux send-keys 'echo 1' Enter 'echo 2' Enter 'echo 3' Enter
49isolated-tmux send-keys C-l echo Up M-d
50tmux-sleep
51isolated-tmux capture-pane -p
52#CHECK: prompt 5> echo 2
53isolated-tmux send-keys C-c
54tmux-sleep
55
56isolated-tmux send-keys "echo sdifjsdoifjsdoifj" Enter
57tmux-sleep
58isolated-tmux capture-pane -p | grep "^sdifjsdoifjsdoifj\|prompt 6>"
59# CHECK: sdifjsdoifjsdoifj
60# CHECK: prompt 6>
61isolated-tmux send-keys C-e C-u C-r
62tmux-sleep
63isolated-tmux send-keys "echo sdifjsdoifjsdoifj"
64tmux-sleep
65isolated-tmux send-keys M-d # alt-d
66tmux-sleep
67isolated-tmux capture-pane -p | grep "(no matches)"
68# CHECK: (no matches)
69isolated-tmux send-keys Enter C-e C-u "echo foo" Enter
70tmux-sleep
71isolated-tmux capture-pane -p | grep "^foo\|prompt 7>"
72# CHECK: foo
73# CHECK: prompt 7>
74
75isolated-tmux send-keys C-c ": Ö" Enter C-l ö C-p
76tmux-sleep
77isolated-tmux capture-pane -p
78# CHECK: prompt {{\d+}}> : Ö