Compare commits
6 Commits
2a71415f0f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 63b2ea7388 | |||
| bd9bc865ab | |||
| 1a943907db | |||
| e903a3a256 | |||
| 1c69b6de79 | |||
| f203391ee6 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
backup/
|
backup/
|
||||||
skel/.profile-local
|
skel/.profile-local
|
||||||
skel/.profile-private
|
skel/.profile-private
|
||||||
|
skel/.profile-post-local
|
||||||
|
skel/.profile-post-private
|
||||||
|
|||||||
11
skel/.bashrc
11
skel/.bashrc
@@ -34,7 +34,7 @@ shopt -s checkwinsize
|
|||||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
debian_chroot=$(cat /etc/debian_chroot)
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
fi
|
fi
|
||||||
|
$()
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm*) color_prompt=yes;;
|
xterm*) color_prompt=yes;;
|
||||||
@@ -72,6 +72,15 @@ xterm*|rxvt*)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Add goodies to PS1
|
||||||
|
export BASE_PS1="$PS1"
|
||||||
|
export BASE_PS1="$(echo "$BASE_PS1" | sed 's!\\\$ $!!g')"
|
||||||
|
export BASE_PS1_END=' \$ '
|
||||||
|
|
||||||
|
# show return value if prompt is nonzero
|
||||||
|
export BASH_GOODIES_RETURNVAL='$([ "$?" = 0 ] && echo "" || echo " \e[31m\][$?]\[\e[0m\]")'
|
||||||
|
PS1="${BASE_PS1}${BASH_GOODIES_RETURNVAL}${BASE_PS1_END}"
|
||||||
|
|
||||||
# enable color support of ls and also add handy aliases
|
# enable color support of ls and also add handy aliases
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
|||||||
@@ -101,3 +101,10 @@ export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"
|
|||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
alias less='less -i -r'
|
alias less='less -i -r'
|
||||||
|
if which winget.exe >/dev/null 2>&1; then
|
||||||
|
alias winget="$(which winget.exe)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# profile variables that need to be defined late
|
||||||
|
[ -f "$HOME/.profile-post-local" ] && source "$HOME/.profile-post-local"
|
||||||
|
[ -f "$HOME/.profile-post-private" ] && source "$HOME/.profile-post-private"
|
||||||
|
|||||||
@@ -86,3 +86,6 @@ emulate bash
|
|||||||
[ -f "$HOME/.rc-local" ] && source "$HOME/.rc-local"
|
[ -f "$HOME/.rc-local" ] && source "$HOME/.rc-local"
|
||||||
emulate zsh
|
emulate zsh
|
||||||
[ -f "$HOME/.zshrc-local" ] && source "$HOME/.zshrc-local"
|
[ -f "$HOME/.zshrc-local" ] && source "$HOME/.zshrc-local"
|
||||||
|
|
||||||
|
# Add return value to prompt if nonzero
|
||||||
|
PS1='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%F{blue}%(?..%F{red}[%?] )%F{blue}%(!.#.$)%b%f '
|
||||||
|
|||||||
Reference in New Issue
Block a user