forked from colonelpanic/dotfiles
Set prompt and pager differently when inside emacs
This commit is contained in:
parent
9c274c29f5
commit
60e4c76205
@ -49,7 +49,7 @@
|
|||||||
# Use custom `.gitignore` and `.gitattributes`
|
# Use custom `.gitignore` and `.gitattributes`
|
||||||
excludesfile = ~/.gitignore
|
excludesfile = ~/.gitignore
|
||||||
attributesfile = ~/.gitattributes
|
attributesfile = ~/.gitattributes
|
||||||
pager = less -FXr
|
# pager = less -FXr # set with environment variable so that pager can be different when inside emacs
|
||||||
|
|
||||||
[color]
|
[color]
|
||||||
# Use colors in Git commands that are capable of colored output when
|
# Use colors in Git commands that are capable of colored output when
|
||||||
|
@ -116,3 +116,10 @@ export EDITOR="$HOME/.lib/editor.sh"
|
|||||||
export ALTERNATE_EDITOR=""
|
export ALTERNATE_EDITOR=""
|
||||||
export VISUAL="$EDITOR"
|
export VISUAL="$EDITOR"
|
||||||
export GIT_EDITOR="$EDITOR"
|
export GIT_EDITOR="$EDITOR"
|
||||||
|
|
||||||
|
# This actually gets executed in dotfiles/lib/shellrc.sh to make sure that it takes precedence over other settings
|
||||||
|
function inside_emacs_hook {
|
||||||
|
export PAGER="$EDITOR"
|
||||||
|
export GITPAGER="$EDITOR"
|
||||||
|
export MANPAGER="$EDITOR"
|
||||||
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
for filename in ~/.lib/shellrc/*; do
|
for filename in ~/.lib/shellrc/*; do
|
||||||
source $filename
|
source $filename
|
||||||
done
|
done
|
||||||
|
environment_variable_exists INSIDE_EMACS && inside_emacs_hook
|
||||||
|
Loading…
Reference in New Issue
Block a user