diff options
Diffstat (limited to 'bins/bin/create-shell-pager.sh')
-rwxr-xr-x | bins/bin/create-shell-pager.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bins/bin/create-shell-pager.sh b/bins/bin/create-shell-pager.sh new file mode 100755 index 000000000000..a0f42cfd2411 --- /dev/null +++ b/bins/bin/create-shell-pager.sh @@ -0,0 +1,7 @@ +#!/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\")" |