From ab385cd6099fdf8e4b1bd838718cb8ebab7cadb9 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 28 Apr 2013 14:36:11 -0700 Subject: [PATCH] Teach fish about rxvt's special key bindings https://github.com/fish-shell/fish-shell/issues/657 --- share/functions/fish_default_key_bindings.fish | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish index 80d538306..18b7318ee 100644 --- a/share/functions/fish_default_key_bindings.fish +++ b/share/functions/fish_default_key_bindings.fish @@ -90,6 +90,12 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis # This will make sure the output of the current command is paged using the less pager when you press Meta-p bind \ep '__fish_paginate' - + + # term-specific special bindings + switch "$TERM" + case 'rxvt*' + bind \e\[8~ end-of-line + bind \eOc forward-word + bind \eOd backward-word + end end -