Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anki-code authored Jun 10, 2024
1 parent 9b1859b commit dd7f2d2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ b.lines
# ['any', 'text', 'here', '']
```

### signal.DisableInterrupt

This macro allows disable SIGINT (Ctrl+C) for group of commands.

```xsh
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.
```

### data.Write

Write a file from block ([rich list of parameters](https://github.com/anki-code/xontrib-macro/blob/main/xontrib/macro/data.py#L12)):
Expand Down

0 comments on commit dd7f2d2

Please sign in to comment.