fzf tmux 注释删除b
fzf tmux pasteb deleteb
试图了解 pasteb
和 deleteb
的来源?
我预计,如果我手动打开 tmux,pasteb 和 deleteb 是内置命令或其他东西,但如果尝试在 tmux 会话中键入它们,我无法判断它们是什么?
https://github.com/junegunn/fzf/blob/master/shell/key-bindings.bash#L34
__fzf_select_tmux__() {
local height
height=${FZF_TMUX_HEIGHT:-40%}
if [[ $height =~ %$ ]]; then
height="-p ${height%\%}"
else
height="-l $height"
fi
tmux split-window $height "cd $(printf %q "$PWD"); FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS") PATH=$(printf %q "$PATH") FZF_CTRL_T_COMMAND=$(printf %q "$FZF_CTRL_T_COMMAND") FZF_CTRL_T_OPTS=$(printf %q "$FZF_CTRL_T_OPTS") bash -c 'source \"${BASH_SOURCE[0]}\"; RESULT=\"$(__fzf_select__ --no-height)\"; tmux setb -b fzf \"$RESULT\" \; pasteb -b fzf -t $TMUX_PANE \; deleteb -b fzf || tmux send-keys -t $TMUX_PANE \"$RESULT\"'"
}
这些是内部 tmux 命令。
来自 tmux
man page :
delete-buffer [−b buffer-name]
(alias: deleteb)
Delete the buffer named buffer-name, or the most recently added automatically named buffer if not specified.
paste-buffer [−dpr] [−b buffer-name] [−s separator] [−t target-pane]
(alias: pasteb)
Insert the contents of a paste buffer into the specified pane. If not specified, paste into the current one. With −d, also delete the paste buffer. When output, any linefeed (LF) characters in the paste buffer are replaced with a separator, by default carriage return (CR). A custom separator may be specified using the −s flag. The −r flag means to do no replacement (equivalent to a separator of LF). If −p is specified, paste bracket control codes are inserted around the buffer if the application has requested bracketed paste mode.
试图了解 pasteb
和 deleteb
的来源?
我预计,如果我手动打开 tmux,pasteb 和 deleteb 是内置命令或其他东西,但如果尝试在 tmux 会话中键入它们,我无法判断它们是什么?
https://github.com/junegunn/fzf/blob/master/shell/key-bindings.bash#L34
__fzf_select_tmux__() {
local height
height=${FZF_TMUX_HEIGHT:-40%}
if [[ $height =~ %$ ]]; then
height="-p ${height%\%}"
else
height="-l $height"
fi
tmux split-window $height "cd $(printf %q "$PWD"); FZF_DEFAULT_OPTS=$(printf %q "$FZF_DEFAULT_OPTS") PATH=$(printf %q "$PATH") FZF_CTRL_T_COMMAND=$(printf %q "$FZF_CTRL_T_COMMAND") FZF_CTRL_T_OPTS=$(printf %q "$FZF_CTRL_T_OPTS") bash -c 'source \"${BASH_SOURCE[0]}\"; RESULT=\"$(__fzf_select__ --no-height)\"; tmux setb -b fzf \"$RESULT\" \; pasteb -b fzf -t $TMUX_PANE \; deleteb -b fzf || tmux send-keys -t $TMUX_PANE \"$RESULT\"'"
}
这些是内部 tmux 命令。
来自 tmux
man page :
delete-buffer [−b buffer-name]
(alias: deleteb)
Delete the buffer named buffer-name, or the most recently added automatically named buffer if not specified.
paste-buffer [−dpr] [−b buffer-name] [−s separator] [−t target-pane]
(alias: pasteb)
Insert the contents of a paste buffer into the specified pane. If not specified, paste into the current one. With −d, also delete the paste buffer. When output, any linefeed (LF) characters in the paste buffer are replaced with a separator, by default carriage return (CR). A custom separator may be specified using the −s flag. The −r flag means to do no replacement (equivalent to a separator of LF). If −p is specified, paste bracket control codes are inserted around the buffer if the application has requested bracketed paste mode.