parent
a239d25d8f
commit
fae88fc9d2
2 changed files with 8 additions and 9 deletions
9
cd/__init__.py
Executable file → Normal file
9
cd/__init__.py
Executable file → Normal file
|
@ -1,14 +1,5 @@
|
|||
#! /usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def install_commands():
|
||||
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
8
cd/__main__.py
Normal file → Executable file
|
@ -1,5 +1,13 @@
|
|||
#! /usr/bin/env python3
|
||||
|
||||
import sys
|
||||
|
||||
import cd
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
cd.install_commands()
|
||||
command, *_ = sys.argv
|
||||
print(command)
|
||||
command = os.path.basename(command)
|
||||
print(command)
|
||||
|
|
Loading…
Reference in a new issue