history

来源:互联网 发布:淘宝7天下架什么意思 编辑:程序博客网 时间:2024/04/29 05:50
# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
HISTSIZE=200000
# === Begin ====
datestamp_for_history(){
export bash_id=$(echo $PPID)
export username=$(whoami)
export workdir=$(echo $PWD)
export infohis=`history 1`
echo $username $bash_id $workdir $infohis >> $HOME/.history-timestamp
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"
}


PS1="\[\033[01;31m\]\u@\[\033[01;33m\]\h.$add \[\033[0;31m\]\W\[\033[37;36m\]\$ \[\033[1;37m\]"
export PROMPT_COMMAND=datestamp_for_history
0 0
原创粉丝点击