Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

shorten terminal prompt linux

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
else
    PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
fi

// Replace Above code with Following Code in ~/.bashrc

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u[33[00m]:[33[01;34m]W[33[00m]$ '
else
    PS1='${debian_chroot:+($debian_chroot)}u:W$ '
fi
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #shorten #terminal #prompt #linux
ADD COMMENT
Topic
Name
6+5 =