<commit_before>from __future__ import print_function
import getpass
import sys

def main():
    command = sys.argv[1:]

    if command[0] == 'show':
        try:
            f = open("/home/" + getpass.getuser() + "/.keep", 'r')
        except IOError:
            print("You have no saved commands")
            sys.exit(2)
        lineno = cmdno = 0
        for line in f.readlines():
            lineno += 1
            if lineno % 2 != 0:
                cmdno += 1
                sys.stdout.write("-"*50 + "\n")
                sys.stdout.write(str(cmdno) + ". " + line[2:])
            else:
                sys.stdout.write(line)
        f.close()
    elif command[0] == 'list':<commit_msg>Added error message and split the print statements.<commit_after>from __future__ import print_function
import getpass
import sys

def print_error_message():
    print("Usages :\n1. keep [options]")
    print("Options: show | list ")
    print("2. keep <command_name> \n <brief_description_of_the_command>") 

def main():
    command = sys.argv[1:]
    if not command:
        print_error_message()
        sys.exit(2)
    if command[0] == 'show':
        try:
            f = open("/home/" + getpass.getuser() + "/.keep", 'r')
        except IOError:
            print("You have no saved commands")
            sys.exit(2)
        lineno = cmdno = 0
        for line in f.readlines():
            lineno += 1
            if lineno % 2 != 0:
                cmdno += 1
                sys.stdout.write("-"*50 + "\n")
                sys.stdout.write(str(cmdno) + ". " + line[2:])
            else:
                sys.stdout.write(line)
        f.close()
    elif command[0] == 'list':
{'fraction_non_alphanumeric': 0.14090368608799048, 'fraction_numerical': 0.01605231866825208, 'mean_word_length': 1.6971153846153846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6382983', 'n_tokens_mistral': 538, 'n_tokens_neox': 508, 'n_words': 133}