mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-14 05:32:45 +08:00
![Johannes Altmanninger](/assets/img/avatar_default.png)
For better or worse, backward-token completely skips over operators like > & |. forward-token is (accidentally?) inconsistent with that. Fix that. Skipping over those tokens might be wrong weird. Maybe not for redirections since they are tighly coupled to their target. Maybe we can improve this in future.
31 lines
897 B
Fish
31 lines
897 B
Fish
#RUN: %fish %s
|
|
#REQUIRES: command -v tmux
|
|
|
|
set isolated_tmux_fish_extra_args -C '
|
|
bind alt-delete backward-kill-token
|
|
bind alt-left backward-token
|
|
bind alt-right forward-token
|
|
set fish_autosuggestion_enabled 0
|
|
'
|
|
isolated-tmux-start
|
|
|
|
isolated-tmux send-keys "function prepend; commandline --cursor 0; commandline -i echo; end" Enter
|
|
isolated-tmux send-keys "bind ctrl-g prepend" Enter
|
|
isolated-tmux send-keys C-l
|
|
isolated-tmux send-keys 'printf'
|
|
isolated-tmux send-keys C-g Space
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 2> echo printf
|
|
|
|
isolated-tmux send-keys C-u C-k C-l 'echo ; foo &| ' M-delete 'bar | baz'
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 2> echo ; bar | baz
|
|
|
|
# To-do: maybe include the redirection?
|
|
isolated-tmux send-keys C-u C-l 'echo >ooba' M-left f M-right r
|
|
tmux-sleep
|
|
isolated-tmux capture-pane -p
|
|
# CHECK: prompt 2> echo >foobar
|