|
@@ -1,9 +1,12 @@
|
|
#TODO: path must be install location
|
|
#TODO: path must be install location
|
|
. "$HOME"/git/recall/rc/.shrc
|
|
. "$HOME"/git/recall/rc/.shrc
|
|
|
|
|
|
-insert() {
|
|
|
|
- bind $'"\u200b":"'"$zle_prefix"'"'
|
|
|
|
- perl -le 'require "sys/ioctl.ph";
|
|
|
|
-ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV' -- "$@"
|
|
|
|
|
|
+insert_with_delay() {
|
|
|
|
+ perl -le 'require "sys/ioctl.ph";
|
|
|
|
+ $delay = shift @ARGV;
|
|
|
|
+ unless(fork) {
|
|
|
|
+ select undef, undef, undef, $delay;
|
|
|
|
+ ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV;
|
|
|
|
+ }' -- "$@";
|
|
}
|
|
}
|
|
-PROMPT_COMMAND="[ \"$zle_prefix\" ] && insert $'\u200b'"
|
|
|
|
|
|
+PROMPT_COMMAND='insert_with_delay 0.05 "$zle_prefix"'
|