add helix-man.sh
This commit is contained in:
parent
ae7b6dd4eb
commit
d64e412e07
1 changed files with 24 additions and 0 deletions
24
helix-man.sh
Normal file
24
helix-man.sh
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
PORT=$1
|
||||||
|
|
||||||
|
if [ "$PORT" = "" ] ; then
|
||||||
|
export PORT=7400
|
||||||
|
fi
|
||||||
|
|
||||||
|
nc localhost $PORT < /dev/null | (
|
||||||
|
echo &
|
||||||
|
while true; do
|
||||||
|
read PAGE || break
|
||||||
|
TOKILL="$(ps --ppid $MANPID -o pid=)"
|
||||||
|
kill $TOKILL > /dev/null
|
||||||
|
echo displaying $PAGE
|
||||||
|
man -P less -s 2:3:1p:9:1 $PAGE &
|
||||||
|
MANPID=$!
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
TOKILL="$(ps --ppid $MANPID -o pid=)"
|
||||||
|
kill $TOKILL > /dev/null
|
||||||
|
) 2> /dev/null
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue