xterm 651 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. #rxvt does not understand the '-hold' option.
  3. #urxvt 20120214
  4. if [ "`echo -n ${*} | grep '\-hold '`" != "" ];then
  5. EXECCOMMAND="`echo -n ${*} | grep -o ' \-e .*' | sed -e 's/ \-e //'`"
  6. if [ "$EXECCOMMAND" != "" ];then
  7. echo '#!/bin/sh' > /tmp/xterm_simulate_hold.sh
  8. echo "$EXECCOMMAND" >> /tmp/xterm_simulate_hold.sh
  9. echo 'echo' >> /tmp/xterm_simulate_hold.sh
  10. echo 'echo -n "FINISHED. PRESS ENTER KEY TO CLOSE THIS WINDOW: "' >> /tmp/xterm_simulate_hold.sh
  11. echo 'read simuldone' >> /tmp/xterm_simulate_hold.sh
  12. chmod +x /tmp/xterm_simulate_hold.sh
  13. exec urxvt -e /tmp/xterm_simulate_hold.sh
  14. fi
  15. fi
  16. exec urxvt "${@}"
  17. #!/bin/sh