# Path: temci/scripts/version.py



import os
import click
import subprocess
        import subprocess
from temci.scripts.version import version
from sys import argv
from os.path import exists

def print_help():
    print("""
temci (version {})  Copyright (C) 2016 Johannes Bechberger
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
For details, see the LICENSE file in the source folder of temci.

Usage of temci_completion:

    temci_completion [{}]

This will return the completion file name.
    """.format(version, "|".join(SUPPORTED_SHELLS)))


def create_completion_dir() -> str:
    """ Create the directory for the completion files if it doesn't already exist. """
    subprocess.check_output(["/bin/mkdir", "-p", completion_dir()])


def completion_dir() -> str:
    """ Get the name of the completion directory """
    return click.get_app_dir("temci")


def completion_file_name(shell: str) -> str:
    """ Get the completion file name for the passed shell and the current temci version """
    assert shell in SUPPORTED_SHELLS

# Path: temci/scripts/version.py



# Path: temci/scripts/temci_completion.py
import os
import click
import subprocess
        import subprocess
from temci.scripts.version import version
from sys import argv
from os.path import exists


def print_help():
    print("""
temci (version {})  Copyright (C) 2016 Johannes Bechberger
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
For details, see the LICENSE file in the source folder of temci.

Usage of temci_completion:

    temci_completion [{}]

This will return the completion file name.
    """.format(version, "|".join(SUPPORTED_SHELLS)))


def create_completion_dir() -> str:
    """ Create the directory for the completion files if it doesn't already exist. """
    subprocess.check_output(["/bin/mkdir", "-p", completion_dir()])


def completion_dir() -> str:
    """ Get the name of the completion directory """
    return click.get_app_dir("temci")


def completion_file_name(shell: str) -> str:
    """ Get the completion file name for the passed shell and the current temci version """
    assert shell in SUPPORTED_SHELLS

    return os.path.join(completion_dir(), "{shell}.{version}.sh".format(shell=shell, version=version))