#!/usr/bin/env python

import os
import click
from shortpath.shortpath import setpath

def print_version(ctx, param, value):
    if not value or ctx.resilient_parsing:
        return
    click.echo('Version 1.1.1')
    ctx.exit()

@click.command()
@click.option('--p', default=os.getcwd(), help='Folders paths')
@click.option('--s', default='', help='Short name for the path')
@click.option('--d', is_flag=True, help='Delete short name for the path')
@click.option('--v', is_flag=True, callback=print_version,
              expose_value=False, is_eager=True, help='Version')
def main(p, s, d):
	print setpath(p, s, d)

main()