Skip to content

Instantly share code, notes, and snippets.

@lufia
Last active February 5, 2018 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lufia/22d65ebc413d05ccbca14b46536f67e4 to your computer and use it in GitHub Desktop.
Save lufia/22d65ebc413d05ccbca14b46536f67e4 to your computer and use it in GitHub Desktop.
clear window content of acme
#!/usr/bin/env bash
# ref https://groups.google.com/forum/#!topic/comp.os.plan9/dL9RQnlY6So
w=acme/$winid
echo -n Edit ,d | 9p write $w/body
echo -n /Edit ,d/ | 9p write $w/addr
echo -n 'dot=addr' | 9p write $w/ctl
9p read $w/addr | awk '{printf("MX%s %s\n", $1, $2)}' | 9p write $w/event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment