spcd/cd/__init__.py

15 lines
307 B
Python
Raw Normal View History

2024-04-26 19:58:35 +00:00
import os
2024-04-26 21:55:20 +00:00
COMMANDS_PREFIX = 'cd-'
def cd_list_environment:
for variable, value in os.environ:
print(variable, value)
2024-04-26 19:58:35 +00:00
2024-04-26 21:24:46 +00:00
def install_commands(path):
user = '/usr/local/bin'
for command in ['list-environment']:
2024-04-26 21:55:20 +00:00
os.symlink(path, os.path.join(user, f'{COMMANDS_PREFIX}{command}'))