about summary refs log tree commit diff
path: root/emacs/index.sh
blob: b7bfd6962011a2d8c92eabe89c74d428a6715aa4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
}