Created
October 11, 2021 13:42
-
-
Save zoomlogo/07b536b9d8d11a752fefde26e015f931 to your computer and use it in GitHub Desktop.
My bashrc (on termux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files() { | |
ls -l | wc -l | awk '{ print $1 - 1}' | |
} | |
last_status() { | |
status=$? | |
if [ $status == 0 ]; then | |
echo -e "\033[32m$status\033[0m" | |
else | |
echo -e "\033[31m$status\033[0m" | |
fi | |
} | |
export PS1='`last_status`|\033[33m`files`\033[0m:\033[36m\W\033[0mλ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment