In my bash_profile, I’m referencing an external alias.sh file, which has the following alias:
alias date="echo `date "+%Y-%m-%d at %H:%M":%S`"
If I issue date in a new terminal session, it constantly outputs the specific date at the time when the alias.sh file was sourced (i.e. when I started the new session) …
How do I make an alias that actually outputs the current date, when executing the aliased command?
Uhh, why not just?
No need to echo it. When you use the backwards tick ( ` ), whatever’s in it gets evaluated when alias.sh is sourced.