fork/fish-shell

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

Johannes AltmanningerFix missing ICANON regression after read in noninteractive shell60b50afef

master
825 B36 linesraw
1#RUN: %fish %s
2#REQUIRES: command -v tmux
3
4isolated-tmux-start -C '
5    set -g fish (status fish-path)
6'
7
8# Implicit interactive but output is redirected.
9isolated-tmux send-keys \
10    '$fish >output' Enter
11tmux-sleep
12isolated-tmux send-keys \
13    'status is-interactive && printf %s i n t e r a c t i v e \n' Enter \
14    C-d
15tmux-sleep
16# Extract the line where command output starts.
17string match <output -r '.*\e\]133;C.*' |
18string escape
19# CHECK: {{.*}}interactive{{$}}
20
21isolated-tmux send-keys \
22    '$fish -c "read; cat"' Enter
23tmux-sleep
24isolated-tmux send-keys \
25    'read-value ' Enter
26tmux-sleep
27isolated-tmux send-keys cat1 Enter
28tmux-sleep
29isolated-tmux send-keys cat2 Enter
30tmux-sleep
31isolated-tmux capture-pane -p -S 2
32# CHECK: read> read-value
33# CHECK: read-value cat1
34# CHECK: cat1
35# CHECK: cat2
36# CHECK: cat2