From 652d61ff68cb917aec51d90d7f49739051dafb2b Mon Sep 17 00:00:00 2001 From: Konstantinos Papadopoulos Date: Wed, 30 Aug 2023 17:08:22 +0200 Subject: [PATCH] Add click's fix for fish autocomplete not working on click 8.1.4 See: - https://github.com/pallets/click/issues/2567 - https://github.com/pallets/click/pull/2570 --- auto_click_auto/core.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/auto_click_auto/core.py b/auto_click_auto/core.py index 320a2f8..8f37525 100644 --- a/auto_click_auto/core.py +++ b/auto_click_auto/core.py @@ -94,14 +94,12 @@ def enable_click_shell_completion( # create it if it doesn't already exist. create_file(file_path=completer_script_path) - # Completion implementation: `eval` command in shell configuration - eval_command = ( - f"eval (env {click_env_var}={shell.value}_source " - f"{program_name})" + command = ( + f"{click_env_var}={shell.value}_source {program_name} | source" ) add_shell_configuration( shell_config_file=completer_script_path, - config_string=eval_command, + config_string=command, verbose=verbose, )