#! /usr/bin/env python3 import sys from pathlib import Path import cd if __name__ == "__main__": path, *arguments = sys.argv name = Path(path).name if name == "__main__.py": cd.set_ssh(*arguments) cd.install_commands(__file__) else: function = getattr(cd, name.replace("-", "_")) function(*arguments)