blob: 8721a57f1ff517cde0a5db97a0985bf9119c976a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
. "$HOME/lib/tputfs.sh"
zero () {
local cmd="$*"
while ! (output="$($cmd)" ; echo "$output" ; [ -z "$output" ]); do
status "executing '$cmd' produced output"
status but it should produce no output -- spawning a shell
status "when you C-d, I will attempt to run '$cmd' again"
eval "$SHELL"
done
}
try () {
local cmd="$*"
while ! $cmd; do
status "executing '$cmd' failed: spawning a shell"
status "when you C-d, I will attempt to run '$cmd' again"
eval "$SHELL"
done
}
|