[LEDE-DEV] [RFC] generic: Optional Command Line Prompts

L. D. Pinney ldpinney at gmail.com
Fri May 13 23:27:51 PDT 2016


This patch sets the busybox prompt to the default. 
It also provides options to colorizes (or not) the command line prompt.
Also optional time display.

Signed-off-by: L. D. Pinney <ldpinney at gmail.com>

---

diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index ad8fe12..3d03204 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -9,7 +9,14 @@ fgrep -sq '/ overlay ro,' /proc/mounts && {
 export PATH="%PATH%"
 export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
 export HOME=${HOME:-/root}
-export PS1='\u@\h:\w\$ '
+#export PS1='\u@\h:\w\$ '
+#export PS1='\t \u@\h:\w\$ '
+#export PS1='[\[\033[31;1m\]\u\[\033[0m\]@\[\033[32;1m\]\h\[\033\[0m\]:\[\033[33;1m\]$PWD\[\033[0m\]]\$ '
+#export PS1='\t [\[\033[31;1m\]\u\[\033[0m\]@\[\033[32;1m\]\h\[\033\[0m\]:\[\033[33;1m\]$PWD\[\033[0m\]]\$ '
+
+### COLORS ###
+# 31 = red ; 32 = green ; 33 = yellow ; 34 = blue ; 
+# 35 = magenta ; 36 = cyan ; 37 = white ; 38 = black
 
 [ -x /bin/more ] || alias more=less
 [ -x /usr/bin/vim ] && alias vi=vim || alias vim=vi



More information about the Lede-dev mailing list