Update after.sh
This commit is contained in:
parent
e9a863f9cd
commit
133610b00d
1 changed files with 14 additions and 1 deletions
15
after.sh
15
after.sh
|
|
@ -112,7 +112,20 @@ setopt HIST_IGNORE_SPACE
|
||||||
# Manual to pdf
|
# Manual to pdf
|
||||||
# ─────────────────────────────────────
|
# ─────────────────────────────────────
|
||||||
|
|
||||||
manual() { man -Tpdf "$1" | okular -; }
|
manual() {
|
||||||
|
local pdf
|
||||||
|
pdf=$(mktemp --suffix=.pdf) || return 1
|
||||||
|
|
||||||
|
if ! man -Tpdf "$1" > "$pdf" 2>/dev/null; then
|
||||||
|
rm -f "$pdf"
|
||||||
|
echo "No manual entry for $1"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
okular "$pdf"
|
||||||
|
rm -f "$pdf"
|
||||||
|
}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Make everything we created belong to the user
|
# Make everything we created belong to the user
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue