From 7e0a1759f9f8f1aab9236ed2cca05b23b3735fa5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 27 Jun 2009 12:39:05 -0400 Subject: [PATCH] Enhancement - cal symlink - Automatically runs "task calendar ..." if "task" is symlinked to "cal". - Allows task to run as a replacement to Unix cal. --- src/Context.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index a4752d78c..03d85458a 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -71,7 +71,11 @@ void Context::initialize (int argc, char** argv) // Capture the args. for (int i = 0; i < argc; ++i) if (i == 0) + { program = argv[i]; + if (program.find ("cal") != std::string::npos) + args.push_back ("calendar"); + } else args.push_back (argv[i]);