blob: 7b64aaeeb5cea655e5984d9a7b3830e44757bd54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
VPIN=
if [ ! -t 0 ]; then
VPIN=`mktemp`
cat > "$VPIN"
fi
export VPIN
f=`mktemp`
</dev/tty >/dev/tty vi +':so /usr/local/etc/vprc' "$@" "$f"
[ "$(wc -c "$f" | awk '{print $1}')" -eq 0 ] && rm "$f"
if [ ! -z "$VPIN" ]; then
vpeval <"$f" | sed 's/^# //'
rm "$VPIN"
fi
|