swap
Some checks failed
/ job (push) Failing after 6s

This commit is contained in:
Marc Beninca 2024-04-26 23:10:58 +02:00
parent a239d25d8f
commit fae88fc9d2
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 8 additions and 9 deletions

9
cd/__init__.py Executable file → Normal file
View file

@ -1,14 +1,5 @@
#! /usr/bin/env python3
import os import os
import sys
def install_commands(): def install_commands():
os.symlink(__file__, f'/usr/local/bin/cd-list-environment') os.symlink(__file__, f'/usr/local/bin/cd-list-environment')
if __name__ == '__main__':
command, *_ = sys.argv
command = os.path.basename(command)
print(f'command: {command}')

8
cd/__main__.py Normal file → Executable file
View file

@ -1,5 +1,13 @@
#! /usr/bin/env python3
import sys
import cd import cd
if __name__ == '__main__': if __name__ == '__main__':
cd.install_commands() cd.install_commands()
command, *_ = sys.argv
print(command)
command = os.path.basename(command)
print(command)