This file contains 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
#!/bin/bash | |
# Usage: copy the code into .zshrc config file | |
# Find out current screen width and hight | |
_COLUMNS=$(tput cols) | |
# Set default message if ( input not provided | |
_MESSAGE=" FBI Warining " | |
# Calculate x and y coordinates so that we can display $MESSAGE | |
# centered in the screen | |
y=$(( ( $_COLUMNS - ${#_MESSAGE} ) / 2 )) | |
spaces=$(printf "%-${y}s" " ") |
NewerOlder