2017-06-13 17:33:16 +02:00
|
|
|
#!/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
|
2017-06-15 23:18:58 +02:00
|
|
|
export EDITOR="edit-file-in-emacs.sh"
|
2017-06-13 17:33:16 +02:00
|
|
|
else
|
|
|
|
export EDITOR=$(which vim)
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2017-06-15 23:18:58 +02:00
|
|
|
vim () {
|
|
|
|
if [ -n "$INSIDE_EMACS" ]; then
|
|
|
|
emacsclient -e "(find-file-other-window \"$1\")"
|
|
|
|
else
|
|
|
|
eval "$EDITOR \"$1\""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-06-13 17:33:16 +02:00
|
|
|
man () {
|
|
|
|
if [ -n "$INSIDE_EMACS" ]; then
|
|
|
|
emacsclient -e "(man \"$1\")"
|
|
|
|
else
|
|
|
|
command man "$1"
|
|
|
|
fi
|
|
|
|
}
|