From fae88fc9d2718592812095b5b4cc2af2940c744c Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 26 Apr 2024 23:10:58 +0200 Subject: [PATCH] swap --- cd/__init__.py | 9 --------- cd/__main__.py | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) mode change 100755 => 100644 cd/__init__.py mode change 100644 => 100755 cd/__main__.py diff --git a/cd/__init__.py b/cd/__init__.py old mode 100755 new mode 100644 index e87e633..ff28ce3 --- a/cd/__init__.py +++ b/cd/__init__.py @@ -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}') diff --git a/cd/__main__.py b/cd/__main__.py old mode 100644 new mode 100755 index 79f3d39..fd2edb9 --- a/cd/__main__.py +++ b/cd/__main__.py @@ -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)