Created
January 8, 2023 05:14
-
-
Save enorms/0d2698dd7aa9caad4368c44f3813990c to your computer and use it in GitHub Desktop.
print and copy date with fun confirmation line in color and emoji (macos zshell)
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
#!/bin/zsh | |
grn="$(tput setaf 2)" | |
didcopymsg='π copied to clipboard π β πΆ' | |
alias copy="tr -d '\n' | pbcopy" | |
alias DATE='echo "$(date '\''+%F %T %Z'\'')" | tee /tmp/output.txt; cat /tmp/output.txt | copy; rm /tmp/output.txt; echo "$grn $didcopymsg"' | |
DATE | |
# 2023-01-07 21:08:53 PST | |
# π copied to clipboard π β πΆ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
would welcome input on making this work with bash, and a multi-platform shebang