tvl-depot/bins/bin/create-shell-pager.sh

8 lines
194 B
Bash
Raw Normal View History

2017-06-13 17:33:16 +02:00
#!/bin/sh
file=$(mktemp -t "$USER-"XXXXXXXX.emacs-pager) || exit 127
trap 'rm -f "$file"' EXIT
trap 'exit 255' HUP INT QUIT TERM
cat "$@" >"$file"
emacsclient -e "(wc/open-in-pager \"$file\")"