From 7a13ef67642a8d671d3b3e2fc16a6c2cec0cfa0f Mon Sep 17 00:00:00 2001 From: Adrian Sevcenco Date: Fri, 1 Mar 2024 18:46:35 +0200 Subject: [PATCH] ALIENPY_NO_HISTORY toggle do disable history and autocompletion --- alienpy/alien.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alienpy/alien.py b/alienpy/alien.py index 945fe09..ad9b66f 100755 --- a/alienpy/alien.py +++ b/alienpy/alien.py @@ -66,7 +66,8 @@ def shlex_join(split_command: list) -> str: return ' '.join(shlex.quote(arg) for # Session save from .setup_cwd import SessionRestore, SessionSave # Setup history -from .tools_history import setupHistory +if not os.getenv('ALIENPY_NO_HISTORY'): + from .tools_history import setupHistory # XRootD functions from .xrd_tools import expand_path_grid, extract_glob_pattern, lfn2meta, lfn2uri, list_files_grid from .xrd_core import (DO_XrootdCp, HAS_XROOTD, download_tmp, upload_tmp, xrd_client, xrd_config_init, @@ -1863,7 +1864,8 @@ def JAlien(commands: Union[list, str, None] = None) -> int: ALIENPY_GLOBAL_WB = InitConnection(cmdlist_func = constructCmdList) # we are doing the connection recovery and exception treatment in AlienConnect() # Begin Shell-like interaction - setupHistory(ALIENPY_GLOBAL_WB) # Setup command history + if not os.getenv('ALIENPY_NO_HISTORY'): + setupHistory(ALIENPY_GLOBAL_WB) # Setup command history print_out('Welcome to the ALICE GRID\nsupport mail: adrian.sevcenco@cern.ch\n') if DEBUG: