From f15d8e2f0c43898f6c5438b5f462c16601348933 Mon Sep 17 00:00:00 2001 From: Giuseppe Landolfi Date: Sat, 6 Jan 2018 06:39:58 +0100 Subject: [PATCH] Add support for Mac to dirhistory plugin Add shortcuts for mac keyboards as an alternative to alt+left abd alt+right: mac users can now use opt+left and opt+right. --- plugins/dirhistory/dirhistory.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 0209981e3..8138872bc 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -119,6 +119,8 @@ zle -N dirhistory_zle_dirhistory_back # xterm in normal mode bindkey "\e[3D" dirhistory_zle_dirhistory_back bindkey "\e[1;3D" dirhistory_zle_dirhistory_back +# Mac teminal (alt+left/right) +bindkey "^[b" dirhistory_zle_dirhistory_back # Putty: bindkey "\e\e[D" dirhistory_zle_dirhistory_back # GNU screen: @@ -127,6 +129,7 @@ bindkey "\eO3D" dirhistory_zle_dirhistory_back zle -N dirhistory_zle_dirhistory_future bindkey "\e[3C" dirhistory_zle_dirhistory_future bindkey "\e[1;3C" dirhistory_zle_dirhistory_future +bindkey "^[f" dirhistory_zle_dirhistory_future bindkey "\e\e[C" dirhistory_zle_dirhistory_future bindkey "\eO3C" dirhistory_zle_dirhistory_future