mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge 4cc7c05a74 into 5667161d49
This commit is contained in:
commit
b85640228a
1 changed files with 16 additions and 0 deletions
16
plugins/refresh/refresh.plugin.zsh
Executable file
16
plugins/refresh/refresh.plugin.zsh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Simple ZLE widget that binds F5 to "source ~/.zshrc".
|
||||||
|
#
|
||||||
|
# You can bind it to another key 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 ${REFRESH_KEY:-$DEFAULT_REFRESH_KEY} _refresh
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue