fork/fish-shell

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

Johannes Altmanningerreader: repaint commands to not disable "last_cmd"-based UI states (pager etc.)f2b070649

master
1.6 KiB59 linesraw
1#RUN: %fish %s
2#REQUIRES: command -v tmux
3
4isolated-tmux-start -C '
5    function fish_prompt
6        set -g counter (math $counter + 1)
7        set -g fish_color_status red
8        set -g fish_pager_color_background --background=white
9        echo "$counter> "
10        set -ga TERM .
11        set -ga COLORTERM .
12        set -ga fish_term256 .
13        set -ga fish_term24bit .
14    end
15    set -eg fish_color_param
16    bind ctrl-g,A  "{ set -l fish_color_command 111 }"
17    bind ctrl-g,B "set -l fish_color_command 222"
18    bind ctrl-g,C "set -e fish_color_command"
19    bind ctrl-g,D "set -eg fish_color_param"
20    bind ctrl-g,E "set -g fish_color_command 333"
21    bind ctrl-g,F "set -U fish_color_param 444"
22    bind ctrl-g,G "set -eg fish_color_command"
23    bind ctrl-g,R repaint
24'
25
26isolated-tmux capture-pane -p
27# The weird global assignments in fish prompt cause an initial repaint.
28# CHECK: 2>
29
30isolated-tmux send-keys C-g A C-g B C-g C C-g D
31tmux-sleep
32isolated-tmux capture-pane -p
33# CHECK: 2>
34
35isolated-tmux send-keys C-g E
36tmux-sleep
37isolated-tmux capture-pane -p
38# CHECK: 3>
39
40isolated-tmux send-keys C-g F
41tmux-sleep
42isolated-tmux capture-pane -p
43# CHECK: 4>
44
45isolated-tmux send-keys C-g G
46tmux-sleep
47isolated-tmux capture-pane -p
48# CHECK: 5>
49
50isolated-tmux send-keys status Space Tab C-g R Tab
51tmux-sleep
52isolated-tmux capture-pane -p | sed 2q
53# CHECK: 6> status
54# CHECK: basename  (Print the file name (without the path) of the currently running scr…)
55isolated-tmux send-keys C-g R Tab
56tmux-sleep
57isolated-tmux capture-pane -p | sed 2q
58# CHECK: 7> status basename
59# CHECK: basename  (Print the file name (without the path) of the currently running scr…)