mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-06 01:58:46 +00:00
1c4bb214d2
This lacks the tmux-256color terminfo entry, leading to spurious warnings like warning: Could not set up terminal. <= no check matches warning: TERM environment variable set to \'tmux-256color\'. <= no check matches warning: Check that this terminal type is supported on this system. <= no check matches warning: Using fallback terminal type \'ansi\'. <= no check matches
44 lines
1.3 KiB
Fish
44 lines
1.3 KiB
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
# Github Actions currently (2022-06-09)
|
|
# doesn't include the tmux-256color terminfo on macOS.
|
|
# So we skip tmux tests there.
|
|
#REQUIRES: test -z "$CI" -o "$(uname)" != Darwin
|
|
|
|
set -g isolated_tmux_fish_extra_args -C '
|
|
set -g fish_autosuggestion_enabled 0
|
|
function abbr-test
|
|
end
|
|
abbr -g abbr-test "abbr-test [expanded]"
|
|
'
|
|
isolated-tmux-start
|
|
|
|
# Expand abbreviations on space.
|
|
isolated-tmux send-keys abbr-test Space arg1 Enter
|
|
tmux-sleep
|
|
# CHECK: prompt {{\d+}}> abbr-test [expanded] arg1
|
|
|
|
# Expand abbreviations at the cursor when executing.
|
|
isolated-tmux send-keys abbr-test Enter
|
|
tmux-sleep
|
|
# CHECK: prompt {{\d+}}> abbr-test [expanded]
|
|
|
|
# Use Control+Z right after abbreviation expansion, to keep going without expanding.
|
|
isolated-tmux send-keys abbr-test Space C-z arg2 Enter
|
|
tmux-sleep
|
|
# CHECK: prompt {{\d+}}> abbr-test arg2
|
|
|
|
# Or use Control+Space ("bind -k nul") to the same effect.
|
|
isolated-tmux send-keys abbr-test C-Space arg3 Enter
|
|
tmux-sleep
|
|
# CHECK: prompt {{\d+}}> abbr-test arg3
|
|
|
|
# Do not expand abbrevation if the cursor is not at the command, even if it's just white space.
|
|
# This makes the behavior more consistent with the above two scenarios.
|
|
isolated-tmux send-keys abbr-test C-Space Enter
|
|
tmux-sleep
|
|
# CHECK: prompt {{\d+}}> abbr-test
|
|
|
|
# CHECK: prompt {{\d+}}>
|
|
|
|
isolated-tmux capture-pane -p
|