Last active
February 19, 2023 14:04
-
-
Save spookyahell/e529f4db9b28a5e70f36edf14805189b to your computer and use it in GitHub Desktop.
Place this in your path (and add .py to PATHEXT if not already done so) to be able to swtich to between seasons seamlessly)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, re | |
from os import getcwd, remove, sep | |
from subprocess import call | |
season = sys.argv[1] | |
cwd = getcwd() | |
switch_to = re.sub(r'S(\d+)', f'S{int(season):02}', cwd) | |
call(['cmd', '/k', f'TITLE {switch_to.split(sep)[-1]} (in {sep.join(switch_to.split(sep)[:-1])})'], cwd = switch_to) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage (once properly placed):
cds 2
Expected behavior/conditions:
Known problems with this approach:
exit
command will only close the most recently created subprocess.This means, it will act like a history of places you have gone with
cd2
cd2
by name, you can find it intaskmgr.éxe
(if you enable the full command line in the "Details" tab)
and then just right-click it and select "Kill all process-tree"