diff options
author | Giuseppe Landolfi <giuseppe.landolfi@gmail.com> | 2018-05-13 01:53:45 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-05-13 01:53:45 +0200 |
commit | 8ebf2a678507b28cf107858b316f5e874ef73d0f (patch) | |
tree | e0e479e7185dadad54e9602c2407c42289778ac6 /plugins | |
parent | 18effd77db1156c11848bd3bfadd8fa63c747516 (diff) | |
download | zsh-8ebf2a678507b28cf107858b316f5e874ef73d0f.tar.gz zsh-8ebf2a678507b28cf107858b316f5e874ef73d0f.tar.bz2 zsh-8ebf2a678507b28cf107858b316f5e874ef73d0f.zip |
Fine-tune dirhistory plugin mappings for Mac (#6580)
See https://github.com/robbyrussell/oh-my-zsh/pull/6533#issuecomment-360878060
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/dirhistory/dirhistory.plugin.zsh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 8138872bc..283dace29 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -120,7 +120,9 @@ zle -N dirhistory_zle_dirhistory_back 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 +if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then + bindkey "^[b" dirhistory_zle_dirhistory_back +fi # Putty: bindkey "\e\e[D" dirhistory_zle_dirhistory_back # GNU screen: @@ -129,7 +131,9 @@ 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 +if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then + bindkey "^[f" dirhistory_zle_dirhistory_future +fi bindkey "\e\e[C" dirhistory_zle_dirhistory_future bindkey "\eO3C" dirhistory_zle_dirhistory_future |