From 719da6da199b15155363bfff73055b039d8ec7dc Mon Sep 17 00:00:00 2001 From: Mayank Patibandla <34776435+mayankpatibandla@users.noreply.github.com> Date: Wed, 5 Jun 2024 23:10:46 -0400 Subject: [PATCH] Save autocomplete script in PROS directory --- pros/cli/misc_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pros/cli/misc_commands.py b/pros/cli/misc_commands.py index 5b1c720f..e94ff19d 100644 --- a/pros/cli/misc_commands.py +++ b/pros/cli/misc_commands.py @@ -120,7 +120,8 @@ def setup_autocomplete(shell, config_path, force): raise click.UsageError(f"Config file {config_path} does not exist. Please specify a valid config file.") # Write the autocomplete script to a shell script file - script_file = config_path.parent / _SCRIPT_FILES[shell] + script_file = Path(click.get_app_dir("PROS")) / "autocomplete" / _SCRIPT_FILES[shell] + script_file.parent.mkdir(exist_ok=True) with script_file.open('w') as f: f.write(_get_shell_script(shell))