mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-26 08:51:57 +00:00
add notes
This commit is contained in:
parent
7b77d63e7e
commit
0be72e33f1
1 changed files with 20 additions and 0 deletions
20
notes.txt
Normal file
20
notes.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
function _p9k_on_widget() {
|
||||
zle _p9k_orig_$1 "${@:2}"
|
||||
}
|
||||
|
||||
time ( repeat 1000 ( () {
|
||||
local tmp=${TMPDIR:-/tmp}/p10k.bindings.$sysparams[pid]
|
||||
{
|
||||
bindkey >$tmp
|
||||
local widget
|
||||
for widget in ${(u)${${(f)"$(<$tmp)"}:#*\"}##* }; do
|
||||
functions[_p9k_widget_$widget]='_p9k_on_widget '${(q)widget}' "$@"'
|
||||
zle -A $widget _p9k_orig_$widget
|
||||
zle -N $widget _p9k_widget_$widget
|
||||
done
|
||||
} always {
|
||||
zf_rm -f $tmp
|
||||
}
|
||||
} ) ) # 2.774s
|
||||
|
||||
time ( repeat 1000 ( () {} ) ) # 0.960s
|
Loading…
Reference in a new issue