aboutsummaryrefslogtreecommitdiff
path: root/notes.txt
diff options
context:
space:
mode:
Diffstat (limited to 'notes.txt')
-rw-r--r--notes.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/notes.txt b/notes.txt
new file mode 100644
index 00000000..07b88579
--- /dev/null
+++ b/notes.txt
@@ -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