spcd/cd/__main__.py
Marc Beninca 660cdbde11
Some checks failed
/ job (push) Failing after 13m6s
Path
2024-06-09 18:09:53 +02:00

17 lines
393 B
Python
Executable file

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