tvl-depot/bins/bin/create-shell-pager.sh
2017-06-15 16:45:11 -04:00

7 lines
214 B
Bash
Executable file

#!/usr/bin/env zsh
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\")" >/dev/null