mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
48 lines
1.2 KiB
Bash
48 lines
1.2 KiB
Bash
# History settings
|
|
HISTCONTROL=ignoredups:ignorespace
|
|
shopt -s histappend
|
|
HISTSIZE=1000
|
|
HISTFILESIZE=0
|
|
|
|
# check the window size after each command and, if necessary,
|
|
# update the values of LINES and COLUMNS.
|
|
shopt -s checkwinsize
|
|
|
|
# Fancier outputs
|
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
|
case "$TERM" in
|
|
xterm-color) color_prompt=yes;;
|
|
esac
|
|
force_color_prompt=yes
|
|
if [ -n "$force_color_prompt" ]; then
|
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
|
color_prompt=yes
|
|
else
|
|
color_prompt=
|
|
fi
|
|
fi
|
|
if [ "$color_prompt" = yes ]; then
|
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
|
else
|
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
|
fi
|
|
unset color_prompt force_color_prompt
|
|
|
|
# If this is an xterm set the title to user@host:dir
|
|
case "$TERM" in
|
|
xterm*|rxvt*)
|
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
fi
|
|
|
|
# Bash completion
|
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
|
. /etc/bash_completion
|
|
fi
|