summaryrefslogtreecommitdiff
path: root/user:hugues/KeyBindings.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-02-04 08:52:05 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-02-04 08:52:05 +0100
commit0918a251365c0ba831a085d2a2786c11eaa102b1 (patch)
treea53566d7da642ccaa6917bf08fbfa5a7edfa8214 /user:hugues/KeyBindings.zsh
parentf6b85812cd7cde549ad8c919d5d3ba45269f8e1d (diff)
[KeyBindings] shows current keymap used into the term title
Diffstat (limited to 'user:hugues/KeyBindings.zsh')
-rw-r--r--user:hugues/KeyBindings.zsh11
1 files changed, 11 insertions, 0 deletions
diff --git a/user:hugues/KeyBindings.zsh b/user:hugues/KeyBindings.zsh
index b06844d..5666dc3 100644
--- a/user:hugues/KeyBindings.zsh
+++ b/user:hugues/KeyBindings.zsh
@@ -58,3 +58,14 @@ zle-line-init() { zle vi-cmd-mode }
zle -N zle-line-init
# Go see man zshzle for more details.
+zle-keymap-select()
+{
+ # $1 is the old keymap
+ # $KEYMAP is the new one
+
+ local curr="$([ "$KEYMAP" = "main" ] && echo "viins" || echo $KEYMAP)"
+
+ term_title " [$curr]"
+
+}
+zle -N zle-keymap-select