dotfiles

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

commit eae049ea7beff7715cfd4ceb7df02cbb6e10801e (patch)
parent 519571c3ce4a4888de920e387f305fd958eadf7e
Author: Alex Karle <alex@alexkarle.com>
Date:   Mon,  7 Mar 2022 22:08:47 -0500

bin: Update demo(1) remove named, saved, output

I found the need to name the scripts to be not really useful in the long
term--I never re-visited my old demo's and having to name them just
kinda slowed down startup!

Diffstat:
Mbin/demo | 17+----------------
1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/bin/demo b/bin/demo @@ -1,19 +1,5 @@ #!/bin/sh # demo -- script(1) wrapper with shell config for better copy/pasta -set -e -die() { - echo "$*" 1>&2 - exit 1 -} - -[ -z "$1" ] && die "usage: demo 'brief description'" - -desc=$(printf "$*" | tr '[[:space:]]' '_') -OUT=$HOME/demo/$desc.script -if [ -e "$OUT" ]; then - die "ERROR: demo file $OUT already exists" -fi - cat <<EOM >/tmp/demo.env export TERM=dumb export PAGER=cat @@ -21,6 +7,5 @@ alias g="echo 'Use the full command during demo(1)!'" PS1='\$ ' EOM -mkdir -p "$HOME/demo" export ENV=/tmp/demo.env -script -c /bin/sh "$OUT" +script -c /bin/sh /tmp/demo.script