Commit 1b7178bb authored by Cédric Marie's avatar Cédric Marie

bash: Split the shell prompt into two lines

When the working directory is too long, the space left for the command
is too short.

Change the prompt to wait for the command on the next line, and use
special UTF-8 unicode characters (box drawings and a pointer) to make
it a little bit nicer.
Signed-off-by: Cédric Marie's avatarCédric Marie <cedric@hjuvi.fr.eu.org>
parent ba56b9b3
Painted Shell: A collection of colorful settings and scripts for Bash shell.
Written in 2013-2019 by Cédric Marie <cedric@hjuvi.fr.eu.org>
Written in 2013-2020 by Cédric Marie <cedric@hjuvi.fr.eu.org>
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
......
......@@ -4,7 +4,7 @@
# init - Configuration for bash
# This file is part of Painted Shell - Shell configuration and scripts.
#
# Written in 2013-2018 by Cédric Marie
# Written in 2013-2020 by Cédric Marie
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
......@@ -29,7 +29,7 @@ if [ -f /usr/share/git-core/contrib/completion/git-prompt.sh ]; then
fi
# Set colorful prompt
if [ "$TERM" != "" ]; then
PS1='\[\e[1;37;43m\]\t\[\e[0m\] \[\e[1;36;44m\]\w\[\e[0;32;40m\]$(__git_ps1)\[\e[0m\]\[\e[1;31m\] >\[\e[0m\] '
PS1='\[\e[1;31m\]╭─\[\e[1;37;43m\]\t\[\e[0m\] \[\e[1;36;44m\]\w\[\e[0;32;40m\]$(__git_ps1)\[\e[0m\]\n\[\e[1;31m\]╰────────►\[\e[0m\] '
fi
# Add the path to scripts if not yet present
echo $PATH | grep -q "$PAINTED_SHELL_PATH/scripts" || PATH=$PATH:$PAINTED_SHELL_PATH/scripts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment