diff --git a/plugins/refresh/refresh.plugin.zsh b/plugins/refresh/refresh.plugin.zsh old mode 100644 new mode 100755 index 425ed91ec..7e369a8bc --- a/plugins/refresh/refresh.plugin.zsh +++ b/plugins/refresh/refresh.plugin.zsh @@ -1,8 +1,16 @@ #!/usr/bin/env zsh # ------------------------------------------------------------------------------ # Simple ZLE widget that binds F5 to "source ~/.zshrc". +# +# You can bind it to another ikey by setting the REFRESH_KEY +# environment variable, for example to bind F4 instead of F5: +# export REFRESH_KEY=$terminfo[kf4] # ------------------------------------------------------------------------------ +# Default key is F5. +DEFAULT_REFRESH_KEY=$terminfo[kf5] + _refresh() { source ~/.zshrc } zle -N _refresh -bindkey '^[[15~' _refresh +bindkey ${REFRESH_KEY:-$DEFAULT_REFRESH_KEY} _refresh +