.bashrc 389 B

123456789101112
  1. #TODO: path must be install location
  2. . "$HOME"/git/recall/rc/.shrc
  3. insert_with_delay() {
  4. perl -le 'require "sys/ioctl.ph";
  5. $delay = shift @ARGV;
  6. unless(fork) {
  7. select undef, undef, undef, $delay;
  8. ioctl(STDIN, &TIOCSTI, $_) for split "", join " ", @ARGV;
  9. }' -- "$@";
  10. }
  11. PROMPT_COMMAND='insert_with_delay 0.05 "$zle_prefix"'