diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2012-01-19 17:53:31 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2012-01-19 17:53:31 +0100 |
commit | e7a6bf828ddda4abdc1a973fb04df70ec29d5757 (patch) | |
tree | 9a89e0bdf4734b3fe70a40489ee25ef76cefbbfd | |
parent | 4678c9b8878aadb905fe63b5a3972b00ed237ee3 (diff) |
[Funcs] birthdays update
-rw-r--r-- | 01_Functions.zsh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/01_Functions.zsh b/01_Functions.zsh index 0351b9e..b402cb8 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -412,13 +412,11 @@ birthdays() if cmd_exists when && [ -e $WHEN_FILE ] then - LATEST=`stat 2>&- --printf="%z\n" $TODAY_FILE | cut -d' ' -f1` - TODAY=`date "+%Y-%m-%d"` - - if [ "$TODAY" != "$LATEST" ] - then - when w --calendar=$WHEN_FILE | tail -n+3 > $TODAY_FILE - fi + when --calendar=$WHEN_FILE $@ | tail -n+3 | \ + sed 's/^\(aujourd.hui *[0-9][0-9][0-9][0-9] [A-Z][a-z]\+ [0-9][0-9][ ]*\)\(.*\)/'$c_'1;33'$_c'\1\2'$c_'0'$_c'/; + s/^\(demain *[0-9][0-9][0-9][0-9] [A-Z][a-z]\+ [0-9][0-9][ ]*\)\(.*\)/'$c_'1'$_c'\1\2'$c_'0'$_c'/; + s/^\(hier *[0-9][0-9][0-9][0-9] [A-Z][a-z]\+ [0-9][0-9][ ]*\)\(.*\)/'$c_'3'$_c'\1\2'$c_'0'$_c'/' \ + > $TODAY_FILE if [ -s $TODAY_FILE ] then |