diff options
Diffstat (limited to 'emacs/index.sh')
-rw-r--r-- | emacs/index.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/emacs/index.sh b/emacs/index.sh new file mode 100644 index 000000000000..b7bfd6962011 --- /dev/null +++ b/emacs/index.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env zsh + + +if [ -n "$INSIDE_EMACS" ]; then + export PAGER="create-shell-pager.sh" +else + export PAGER="less" +fi + + +if [ -n "$INSIDE_EMACS" ]; then + export EDITOR="emacsclient" +else + export EDITOR=$(which vim) +fi + + +man () { + if [ -n "$INSIDE_EMACS" ]; then + emacsclient -e "(man \"$1\")" + else + command man "$1" + fi +} |