[Remind-Fans] Problems Aliasing Remind Output Using the Today Variable

Justin Alcorn justin at jalcorn.net
Tue Jan 2 11:10:17 EST 2007


The problem is that the alias commands are run as part of your shell 
startup, and the command

`(echo 'banner %'; echo 'msg [trigger(today()+2)]') | remind -`

is run during shell startup, and the _result_ is used in the alias 
command.  So the date is the day you log in.

You need to find some way to escape the meaning of the `` and have that 
put into the alias.

The easiest way is to forget alias and make them shell scripts in your path.



Mike Harris wrote:
> I have a few commands aliased in Unix (I'm using Mac OS X) so that they will show me tomorrow's schedule, the day after that, and so on.  As I use tcsh, the alias takes the form of:
> 
> alias 2trem "remind ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()+2)]') | remind -`"
> alias 2yrem "remind ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()-2)]') | remind -`"
> alias 3trem "remind ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()+3)]') | remind -`"
> alias 3yrem "remind ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()-3)]') | remind -`"
> alias trem "remind ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()+1)]') | remind -`"
> alias yrem "remind ~/.reminders `(echo 'banner %'; echo 'msg [trigger(today()-1)]') | remind -`"
> 
> The problem I am running into with this setup, however, is that the 'today()' variable doesn't seem to get refreshed at all from day to day.  In other words, let's say I open up a terminal session on December 29.
> 
> If I ran trem today -- the evening of January 1, 2007 -- it would not show me remind's output for 1/2/07, it would show remind's output to me for 12/30/06.
> 
> Any thoughts on how to solve this?
> 
> Mike
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.whatexit.org
> http://lists.whatexit.org/mailman/listinfo/remind-fans




More information about the Remind-fans mailing list