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

This commit is contained in:
Marc Beninca 2024-04-26 23:24:46 +02:00
parent 539df80b93
commit e27f66e569
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 8 additions and 5 deletions

View file

@ -1,5 +1,7 @@
import os import os
def install_commands(): def install_commands(path):
os.symlink(__file__, '/usr/local/bin/cd-list-environment') user = '/usr/local/bin'
for command in ['list-environment']:
os.symlink(path, os.path.join(user, f'cd-{command}')

View file

@ -8,7 +8,8 @@ import cd
if __name__ == '__main__': if __name__ == '__main__':
command, *_ = sys.argv command, *_ = sys.argv
print(command)
command = os.path.basename(command) command = os.path.basename(command)
if command == '__main__.py':
cd.install_commands(__file__)
else:
print(command) print(command)
cd.install_commands()