fish-shell/tests/checks/tmux-autosuggestion.fish
Johannes Altmanninger 24e216ae82
Some checks are pending
make test / ubuntu (push) Waiting to run
make test / ubuntu-32bit-static-pcre2 (push) Waiting to run
make test / ubuntu-asan (push) Waiting to run
make test / macos (push) Waiting to run
Rust checks / rustfmt (push) Waiting to run
Rust checks / clippy (push) Waiting to run
Fix regression causing missing autosuggestions after (
Commit 4f3d6427ce (Fix regression causing crash in "commandline -j",
2025-01-12) wasn't quite right; it mishandles the edge case where
the current process has no token, fix that.
2025-01-13 22:22:42 +01:00

39 lines
989 B
Fish

#RUN: %fish %s
#REQUIRES: command -v tmux
isolated-tmux-start
isolated-tmux send-keys 'echo "foo bar baz"' Enter C-l
isolated-tmux send-keys 'echo '
tmux-sleep
isolated-tmux send-keys M-Right
isolated-tmux capture-pane -p
# CHECK: prompt 1> echo "foo bar baz"
tmux-sleep
touch COMPL
# Regression test.
isolated-tmux send-keys C-u C-l ': sometoken' M-b c
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 1> : csometoken
# Test that we get completion autosuggestions also when the cursor is not at EOL.
isolated-tmux send-keys C-u 'complete nofilecomp -f' Enter C-l 'nofilecomp ./CO' C-a M-d :
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 2> : ./COMPL
isolated-tmux send-keys C-u C-k C-l ': ./CO'
tmux-sleep
isolated-tmux send-keys A C-h
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 2> : ./COMPL
isolated-tmux send-keys C-u 'echo (echo)' Enter
isolated-tmux send-keys C-l 'echo ('
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 3> echo (echo)