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

8 lines
214 B
Bash
Raw Normal View History

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