简体   繁体   中英

osx terminal clear command queue

I carelessly entered the up arrow followed by a return symbol while running a lengthy process in terminal. If I don't intervene the process will start over, clearing the results of the previous run. Is there any way I can clear terminal's command queue?

The "queue" may not have been read yet...

If the process (and shell) honor job-control, then you could try suspending the process temporarily ( control Z ) and resuming it (eg, %1 ). For this situation it is common (but not required) that on resuming the process the pending input on the terminal is discarded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM