$HOME is where the <3 is
git clone git://
Log | Files | Refs | README | LICENSE

commit 0f981c053497c6834acc31a258217a0e8411807d (patch)
parent db55ff42d497a024adbf3add9696249d93ddcdd5
Author: Alex Karle <>
Date:   Tue, 15 Feb 2022 23:56:34 -0500

bin: Add new `demo(1)` for `script(1)` support

I frequently want to get the output of commands to a coworker
and script(1) would be a nice tool to use, with a few caveats:

1. Escape sequences don't transfer well
2. Muscle memory has me using my aliases

demo(1) solves both of these by spawning a new shell without
my aliases and with TERM=dumb to prevent the sequences. It also
sets a blank prompt, which is frequently desirable when sharing
snippets (frequently my PWD is not useful / adds noise).

Excited to try it out tomorrow!

Abin/demo | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/bin/demo b/bin/demo @@ -0,0 +1,11 @@ +#!/bin/sh +# demo -- script(1) wrapper with shell config for better copy/pasta +cat <<EOM >/tmp/demo.env +export TERM=dumb +export PAGER=cat +alias g="echo 'Use the full command during demo(1)!'" +PS1='\$ ' +EOM + +export ENV=/tmp/demo.env +script /tmp/demo.out