         else input
 
 
-# Alias handling
+# Alias creation
 cmd.command('alias <alias> <resource>')
     .description('Create an alias for a Harvest resource. Shortcut: a')
     .option('-t, --type <type>', 'specify the resource type for which to create an alias. Default: project')

        commands.alias cmd.args[0], cmd.args[1], parseAlias program.type


cmd.command('list <resource>')
    .description('Show all aliases for a Harvest resource. Shortcut: la')
    .action (prog, args, program) ->
        commands.aliases parseAlias cmd.args[0]


# Summary reporting
cmd.command('range <fromDate> <toDate>')
    .description('Show logged time for a date range.')
    .action ->
        commands.range cmd.args[0], cmd.args[1]

cmd.command('day [date]')
    .description('Show logged time for a date (default = today). Shortcut: d')
    .action ->
        commands.day cmd.args[0]

cmd.command('week [date]')
    .description('Show logged time for the week of a date (default = today). Shortcut: w')
    .action ->
        commands.week cmd.args[0]

# Time tracking
cmd.command('start <project> [task] [time] [note]')
    .description('Start a new timer for a given task. Project and task can be passed as a single string in dot notation (i.e. project.task) or as two separate arguments. Optionally adding initial time spent to the timer and/or a note. Shortcut: s')
    .action ->


cmd = require "commander"
commands = require './'
cmd.version(require("../package.json").version)


# Helper to parse shorthand resource names for aliasing
parseAlias = (input) ->
    switch input
        when 'c' then 'client'
