diff options
author | William Carroll <wpcarro@gmail.com> | 2017-06-13T15·33-0400 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2017-06-13T15·33-0400 |
commit | 8fff1ba8905256ba8d24c0ae47b5da0eb4efc066 (patch) | |
tree | f0828dd229d92d33aba07655f1f2a4fe27c03da7 /bins | |
parent | 6b3d011491bf03033f5e008792d82bc32b1976ea (diff) |
Better integrates CLI and Emacsclient
Diffstat (limited to 'bins')
-rwxr-xr-x | bins/bin/create-shell-pager.sh | 7 | ||||
-rw-r--r-- | bins/setup_bins.sh | 3 |
2 files changed, 10 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\")" diff --git a/bins/setup_bins.sh b/bins/setup_bins.sh new file mode 100644 index 000000000000..5f989cb80741 --- /dev/null +++ b/bins/setup_bins.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh + +ln -s $HOME/pc_settings/bins/bin/* ~/bin |