spcd/cd/__main__.py
Marc Beninca ab2560ded2
All checks were successful
/ job (push) Successful in 1m43s
imports
2024-06-09 00:01:38 +02:00

17 lines
385 B
Python
Executable file

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