fork/fish-shell

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

Asuka MinatoShow soft-wrapped portions in autosuggestionsf417cbc98

master
1.4 KiB39 linesraw
1#RUN: %fish %s
2#REQUIRES: command -v tmux
3#REQUIRES: test -z "$CI"
4
5isolated-tmux-start -C '
6    history append ": $(string repeat $COLUMNS A)"
7    complete : -a \'(seq (math "$LINES * $COLUMNS"))\'
8'
9
10# Check that completions don't break from truncated autosuggestion
11isolated-tmux send-keys : Space Tab Tab
12tmux-sleep
13isolated-tmux capture-pane -p
14# CHECK: prompt 0> : AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
15# CHECK: AAAAAAAAAAAA
16# CHECK: 1    135  269  403  537  671
17# CHECK: 2    136  270  404  538  672
18# CHECK: 3    137  271  405  539  673
19# CHECK: 4    138  272  406  540  674
20# CHECK: 5    139  273  407  541  675
21# CHECK: 6    140  274  408  542  676
22# CHECK: 7    141  275  409  543  677
23# CHECK: rows 1 to 7 of 134
24
25# Check that completions don't break when called on empty line
26isolated-tmux send-keys C-u 'set fish_autosuggestion_enabled 0; function fish_prompt; string repeat (math $COLUMNS - 2) 0; end' Enter
27isolated-tmux send-keys C-l : Space Tab Tab
28tmux-sleep
29isolated-tmux capture-pane -p
30# CHECK: 000000000000000000000000000000000000000000000000000000000000000000000000000000:
31# CHECK:
32# CHECK: 1    135  269  403  537  671
33# CHECK: 2    136  270  404  538  672
34# CHECK: 3    137  271  405  539  673
35# CHECK: 4    138  272  406  540  674
36# CHECK: 5    139  273  407  541  675
37# CHECK: 6    140  274  408  542  676
38# CHECK: 7    141  275  409  543  677
39# CHECK: rows 1 to 7 of 134