TGViewer
Terminal Notes Terminal Notes @terminalnotes · 30 subscribers
Post #33 64
💢 فیش ورژن 4 و تغییر Keybind های دیفالت

توی fish shell از ورژن 4 به بعد، اومدن bind های پیش‌فرض رو عوض کردن و ماسل مموری کاربرای قدیمی رو به چالش کشیدن. مثال تفاوت alt+backspace بین ورژن 3 و 4:

🔹Version 3
curl https://wttr.in/Tehran  # before
curl https://wttr.in/ # after


🔸Version 4
curl https://wttr.in/Tehran  # before
curl # after


توی ورژن 3 کلمه پاک میشه ورژن 4 توکن.

🛠 راه حل


اگه مثل من به ورژن 3 عادت دارید، برای برگشتن به رفتار قدیمی فایل fish_user_key_bindings.fish رو توی مسیر زیر بسازید:
~/.config/fish/functions/


و کد زیر رو داخلش paste کنید:
function fish_user_key_bindings
bind alt-left prevd-or-backward-word
bind alt-right nextd-or-forward-word
bind alt-backspace backward-kill-word
bind alt-delete kill-word

bind ctrl-left backward-token
bind ctrl-right forward-token
bind ctrl-backspace backward-kill-token
bind ctrl-delete kill-token
bind ctrl-alt-h backward-kill-word
end


اسم فایل و فانکشن نه تنها باید با هم یکی باشن، بلکه باید دقیقا همین اسم باشن — چون fish_user_key_bindings یه هوک هاردکد‌شده fish هست که بعد از لود شدن bind های پیش‌فرض صدا زده میشه.


پ.ن: فیش یه مکانیزم autoload داره که هر فایلی توی
~/.config/fish/functions/
قرار بگیره به عنوان یه فانکشن مستقل لود میشه.

🔗 Issue 10926

🔘 @TerminalNotes <- #linux #fish
More from @terminalnotes
  1. Aug 28, 2026🔗 Students should only use AI for things they already know how to do well The author argu…
  2. Jul 16, 2026آیا هوش مصنوعی داره قدرت تفکر رو از ما می‌گیره؟🏃‍♂ یه مقاله‌ی جالب توی وبلاگ ArtFish منتش…
  3. Jul 9, 2026🔘 @TerminalNotes
  4. Jul 5, 2026خلاصه ویدیو ها: چطور ابتکار عمل داشته باشیم و از صفر پروژه بنویسیم. برای جونیور دولوپر برن…
  5. Jul 5, 2026🔗 Tutorials Are KILLING Your Growth | Prime Reacts 🔘 @TerminalNotes <- #youtube
  6. Jul 5, 2026🔗 How To Get Out of Tutorial Hell (Step by Step Guide) 🔘 @TerminalNotes <- #youtube
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →