Skip to content

Instantly share code, notes, and snippets.

@zoomlogo
Created October 11, 2021 13:42
Show Gist options
  • Save zoomlogo/07b536b9d8d11a752fefde26e015f931 to your computer and use it in GitHub Desktop.
Save zoomlogo/07b536b9d8d11a752fefde26e015f931 to your computer and use it in GitHub Desktop.
My bashrc (on termux)
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