繁体   English   中英

fish shell 绑定不工作(MacOS,iterm2,fish 3.5.1)

[英]fish shell bind not working (MacOS, iterm2, fish 3.5.1)

无法绑定 ^F (ctrl+F) 以完成自动建议。

在此处输入图像描述

还试图通过 - 使其永久化

# ~/.config/fish/config.fish
function fish_user_key_bindings
    bind \cr 'direnv allow'
    bind \cf accept-autosuggestion
end

if status is-interactive
    # Commands to run in interactive sessions can go here
    fish_user_key_bindings
end

系统构建和配置 - 我有 karabiner 元素和更好的触摸工具正在运行,但关闭它没有效果,因为我演示了输入确实被读取。

brew info tmux
==> tmux: stable 3.3a (bottled), HEAD
Terminal multiplexer
https://tmux.github.io/
/usr/local/Cellar/tmux/HEAD-1536b7e (9 files, 1.1MB)
  Built from source on 2022-12-01 at 10:24:48
/usr/local/Cellar/tmux/3.3a (9 files, 1MB) *
  Poured from bottle on 2022-06-13 at 16:19:33
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tmux.rb
License: ISC

--------------------------------------
OS: macOS 13.1 22C65 x86_64
Host: MacBookPro16,2
Kernel: 22.2.0
Uptime: 7 days, 4 hours, 14 mins
Packages: 305 (brew), 44 (nix-user)
Shell: fish 3.5.1
Resolution: 2560x1440
DE: Aqua
WM: Rectangle
Terminal: tmux
CPU: Intel i5-1038NG7 (8) @ 2.00GHz
GPU: Intel Iris Plus Graphics
Memory: 13730MiB / 16384MiB

iterm2: 3.4.18 (auto_updates)
https://www.iterm2.com/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/iterm2.rb

键绑定适用于单一模式。 默认模式是“default”,对应于使用 vi 键绑定时的正常模式。 这就是绑定在插入模式下不起作用的原因。

要在插入模式下添加此绑定:

bind -M insert \cf accept-autosuggestion

如果您希望在正常模式和插入模式下都使用它:

bind -M default \cf accept-autosuggestion
bind -M insert \cf accept-autosuggestion

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM