Updates emacs pager helper script

This commit is contained in:
William Carroll 2017-06-15 16:45:11 -04:00
parent bea42cf0f9
commit 1cd470b85d

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/usr/bin/env zsh
file=$(mktemp -t "$USER-"XXXXXXXX.emacs-pager) || exit 127 file=$(mktemp -t "$USER-"XXXXXXXX.emacs-pager) || exit 127
trap 'rm -f "$file"' EXIT trap 'rm -f "$file"' EXIT
trap 'exit 255' HUP INT QUIT TERM trap 'exit 255' HUP INT QUIT TERM
cat "$@" >"$file" cat "$@" >"$file"
emacsclient -e "(wc/open-in-pager \"$file\")" emacsclient -e "(wc/open-in-pager \"$file\")" >/dev/null