import os COMMANDS_PREFIX = 'cd-' def cd_list_environment(): for variable, value in os.environ.items(): print(variable, value) def install_commands(path): user = '/usr/local/bin' for command in ['list-environment']: os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}'))