-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshinit
More file actions
56 lines (48 loc) · 1.53 KB
/
shinit
File metadata and controls
56 lines (48 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
#
# Jeremy Brubaker <jbru362@gmail.com>
#
# Some stuff ripped from Ryan Tomayko <tomayko.com/about>
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
. "${SSHRC:-"$HOME"}/.alias"
. "${SSHRC:-"$HOME"}/.functions" # Allow functions to override aliases
. "${SSHRC:-"$HOME"}/.prompts"
if command -v zoxide >/dev/null; then
export _ZO_DATA_DIR=$XDG_STATE_HOME
if test -n "$BASH"; then
eval "$(zoxide init bash --hook pwd)"
else
eval "$(zoxide init posix --hook prompt)"
fi
fi
if [ "$PAGER" = 'less' ] || [ "$MANPAGER" = 'less' ]; then
# Prevent groff from emitting escapes itself or the following will not work
export GROFF_NO_SGR=1
# Make formatting codes look nicer
#
# These must be set in .bashrc because $TERM
# can change for every invocation of the shell
#
# mb blink
# md bold
# me bold, blink, underline off
# so reverse
# se reverse off
# us underline
# ue underline off
if command -v tput >/dev/null; then
export LESS_TERMCAP_mb=$(tput blink)
export LESS_TERMCAP_md=$(tput bold; tput setaf 39)
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput smso)
export LESS_TERMCAP_se=$(tput sgr0)
export LESS_TERMCAP_us=$(tput sitm; tput setaf 79)
export LESS_TERMCAP_ue=$(tput sgr0)
fi
fi
# Include private and local settings
#
[ -r "$HOME/etc/shinit" ] && . "$HOME/etc/shinit"
[ -r "$HOME/.shinit.local" ] && . "$HOME/.shinit.plocal"
# vim: foldlevel=0