Skip to content

0.4.1

Compare
Choose a tag to compare
@anki-code anki-code released this 10 Jun 21:07
· 7 commits to main since this release
3b6db49

Added signal.DisableInterrupt. This macro allows disabling SIGINT (Ctrl+C) for group of commands.

from xontrib.macro.signal import DisableInterrupt

echo start
with! DisableInterrupt:
    echo 'sleep start'
    sleep 10
    echo 'sleep end'
echo finish

# start
# sleep start
# [Press Ctrl+C]
# KeyboardInterrupt will be raised at the end of current transaction.
# sleep end
# Exception KeyboardInterrupt: KeyboardInterrupt was received during transaction.