From 31df0bd240e1b39e9e3bd387426f97f0004b8fc1 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sat, 9 Dec 2023 16:03:24 +0800 Subject: [PATCH] add time info in `PS1` --- nixhome/.bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixhome/.bashrc b/nixhome/.bashrc index b40168e..5562356 100644 --- a/nixhome/.bashrc +++ b/nixhome/.bashrc @@ -17,7 +17,7 @@ then fi # Define primary prompt (default is '$'): -export PS1='[\u@\h:\w] ' # \w shows absolute path, \W shows current folder. +export PS1='<\u@\h::\w::\t> ' # \w shows absolute path, \W shows current folder. # Always use ssh to connect to CVS repositories: export CVS_RSH=ssh @@ -88,7 +88,7 @@ umask 022 # rwxr-xr-x # PROMPT_COMMAND is expanded only when used. case "$TERM" in xterm*|rxvt*) - PROMPT_COMMAND='echo -ne "\033]0;[${USER}@${HOSTNAME}:${PWD}]B\007"' + PROMPT_COMMAND='echo -ne "\033]0;[${USER}@${HOSTNAME}::${PWD}]B\007"' ;; dumb*) ;; @@ -124,9 +124,9 @@ if [ -n "$force_color_prompt" ]; then fi if [ "$color_prompt" = yes ]; then - PS1='[${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]] ' + PS1='<${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]::\[\033[01;34m\]\w\[\033[00m\]::\t> ' else - PS1='[${debian_chroot:+($debian_chroot)}\u@\h:\w] ' + PS1='<${debian_chroot:+($debian_chroot)}\u@\h::\w::\t> ' fi unset color_prompt force_color_prompt