##########################################################################
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
export TERMINFO=./lib/terminfo
export TERM=xterm+256color
export INPUTRC=$HOME/.inputrc
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm+256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1="\`if [ \$? != 0 ]; then echo \[\e[33m\]---=== \[\e[31m\]Oh, bad command \[\e[33m\]===---; fi\`\n\[\e[1;30m\]== \[\e[0;32m\]CSTL-[USS SVT] \[\e[1;30m\]== \[\e[0;37m\][\[\e[1;34m\]\w\[\e[0;37m\]]\n\[\e[0;37m\][\[\e[1;31m\]\@\[\e[0;37m\]] \[\e[0;32m\]\u@\h \[\e[0;32m\]\$ \[\e[0m\] "
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
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
#path export
export PATH=$PATH:/usr/local/bin
相关推荐
vim配置文件和.bashrc
linux下.bashrc文件修改1
IC虚拟机.bashrc和.vimrc
详细介绍.bash_profile和.bashrc有什么区别
ubuntu16.04 .bashrc
IC610中添加库20120828(修改.bashrc法)
terminal init的时候并不会执行~/.bash_profile、~/.bashrc等脚本了, 这是因为其默认启动执行脚本变为了~/.zshrc。 解决办法就是修改~/.zshrc文件,在其中添加: source ~/.bash_profile、~/.bashrc等脚本文件...
linux下的.bashrc
1 主机树梅派端使用命令vim .bashrc打开文件在文档的最下边的内容里添加 export ROS_MASTER_URL=http://主机树梅派的IP地址:11311 export ROS_IP=主机树梅派的IP地址添加完重启主机2从机端使用命令vim .bashrc打开...
浅析linux 下的/etc/profile、/etc/bashrc、~/.bash_profile、~/.bashrc
它在一定程度上支持使用脚本来定制功能,这时候就要用到 .bashrc 了。 为了加载你的配置,bash 在每次启动时都会加载 .bashrc 文件的内容。它用来存储并加载你的终端配置和环境变量。 最常见的,.bashrc 文件...
.bashrc
NS(网络模拟器)安装过程中需要配置最重要的一个文件.bashrc,这个文件时安装ns-allinone-2.33(版)的时候的配制方法,默认安装路径:C:\cygwin\home\fzh\ns-allinone-2.33 fzh是我的windows登录名,请下载后按...
cp ~/.bashrc ~/.bashrc.orig && cat battery-bashrc.sh > ~/.bashrc 要在脚本中设置的变量: BATTERY_DIR,电池文件夹的路径,没有尾部斜杠。 例如:BATTERY_DIR="/sys/class/power_supply/BAT0"。 您可能可以...
我的点文件这个存储库保存了我所有的 Dot 文件,这些文件与 Gnu/Linux 和 Mac OSX 机器兼容。 还包括自动化脚本以轻松设置和清理环境。快速设置GNU/Linux 环境wget -q ...
我的dotfile的集合(例如.config , .bashrc ) 这是为和编写的。 入门 要安装点dotfiles ,请运行./install.sh 。 当符号链接不合适时,这将创建符号链接并复制/附加文件。 文献资料 重击提示 我的bash提示托管在...
#my包含.bashrc和.vimrc的环境设置 #Linux版本是lubuntu 16.4 #您可以运行“源README.md以运行此脚本” sudo apt更新; sudo apt安装git; #ssh-keygen -t rsa -C“ ” #git config --global user.name“您的...
资源来自pypi官网。 资源全名:bashrc-0.1.137.tar.gz
详细分析了.bash_profile和.bashrc的区别