From: Mike Frysinger Date: Fri, 12 Jun 2020 22:38:12 +0000 (-0400) Subject: timezone: fix date alias when using it with args X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=dadccb496713a424bf80828b8a538b06d8dea9ae;p=home.git timezone: fix date alias when using it with args --- diff --git a/.profile.d/timezone.sh b/.profile.d/timezone.sh index eeda999..2a00e86 100644 --- a/.profile.d/timezone.sh +++ b/.profile.d/timezone.sh @@ -4,4 +4,9 @@ if [[ $- == *i* && -n ${TZ} ]] ; then echo "Timezone now set to $TZ" fi -alias date='date "+%a %d %b %Y %T %Z %z"' +date() { + if [[ $# -eq 0 ]] ; then + set -- "+%a %d %b %Y %T %Z %z" + fi + command date "$@" +}