How to make an animated bash shell prompt for the terminal?

by Black Block   Last Updated April 04, 2015 19:00 PM

I want to make an animated curser prompt in the terminal(Ubuntu 14.04),
so i make this script:

while [ : ]
do
    echo -ne '|\r'
    sleep 0.3
    echo -ne '/\r'
    sleep 0.3
    echo -ne 'δΈ€\r'
    sleep 0.3
    echo -ne '\\ \r'
    sleep 0.3
    echo -ne '|\r'
    sleep 0.3
    echo -ne '$\r'
    sleep 0.3
done

But when i put it in the .bashrc ps1 ~/animated-prompt.sh & it make a text distortion and every thing i write is overridden by the \r character.
enter image description here
so how to make this work ?



Related Questions


How to get to terminal?

Updated September 26, 2015 04:01 AM



Change Terminal 'user@host' colours - Gnome

Updated April 20, 2017 22:02 PM

Customise Bash Terminal Font Colours

Updated May 01, 2017 22:02 PM