spcd/cd/__main__.py
Marc Beninca fbf4141fb3
Some checks failed
/ job (push) Failing after 7s
environ
2024-04-26 23:55:20 +02:00

17 lines
355 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.install_commands(__file__)
else:
command = command.replace('-', '_')
function = getattr(cd, command)
function(*arguments)